parcel-plugin-web-extension
parcel-plugin-web-extension copied to clipboard
invalid parcel entry points in the manifest.json file are deleted in the dist/ output
I have a manifest file which has this field
"web_accessible_resources": ["*.woff2"],
The generated output is:
"web_accessible_resources": [],
The woff2
files are output by Parcel from an import in one of my .css
files as expected, so I just want this value carried across to the output manifest.json
Importing the font files directly in web_accessible_resources
does not work since they are included in node_modules
and the output directory is a mess:
"web_accessible_resources": ["../node_modules/file-icons-js/fonts/fontawesome.woff2"]
results in the output dir:
dist/__/node_modules/file-icons-js/fonts/fontawesome.woff2
the double underscore throws an error in Chrome as _
prefixed dirs are reserved.
My proposed solution here would be to validate the values before using them as parcel entry points and not remove them if they are invalid entry points.
Hey, thanks for filing an issue. I'll have a look soon. If you have a minimal project to reproduce this behaviour, it'd greatly help!
Here is an example repo demonstrating the generated output being removed https://github.com/jthegedus/parcel-plugin-web-extension-test
Thanks! Will take a look at this soon :)
I have the same problem. And found a nice workaround. (well nice-ish. Definitely only a workaround).
I'm now placing symlinks in my assets directory.
src/assets/bootstrap
points to ../node_modules/bootstrap
This way, I don't have to commit any foreign code to my repo. And if npm makes an update, it gets pulled in automatically.
Parcel seems to work perfectly with those links :)
@lhk interesting, cheers for the temp fix.