Skip to content

Filter Assets #79

@stabas

Description

@stabas

Is there a way only to copy those assets which are not already referenced/build?

Referenced assets will be build automatically from rollup but I also want to build (copy) all the other assets that are not in use. As default copy plugin takes all files given in src property, which could lead to duplicate files.

for example:

  • having some assets in src/assets/icons
  • icon-a.svg, icon-b.svg are somewhere referenced in sass files - those will be build automatically (icon-a.1hash23.svg, icon-b.9hash87.svg)
  • still have some assets left: icon-x.svg, icon-y.svg - which are not referenced or used, but i still need them in "dist/assets" with hash
  • using copy plugin for src/assets/icons to cover them all - this will copy (and hash with custom function) also icons which are not used (icon-x.1hash23.svg, icon-y.9hash87.svg) - but unfortunally also those assets which are already referenced/in use/build - now icon-a and icon-b are duplicates in "dist/assets"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions