Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter Assets #79

Open
stabas opened this issue Apr 5, 2024 · 0 comments
Open

Filter Assets #79

stabas opened this issue Apr 5, 2024 · 0 comments

Comments

@stabas
Copy link

stabas commented Apr 5, 2024

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant