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

invalid parcel entry points in the manifest.json file are deleted in the dist/ output #20

Open
jthegedus opened this issue Sep 20, 2018 · 5 comments

Comments

@jthegedus
Copy link

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.

@kevincharm
Copy link
Owner

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!

@jthegedus
Copy link
Author

Here is an example repo demonstrating the generated output being removed https://github.com/jthegedus/parcel-plugin-web-extension-test

@kevincharm
Copy link
Owner

Thanks! Will take a look at this soon :)

@lhk
Copy link

lhk commented Oct 25, 2018

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 :)

@jthegedus
Copy link
Author

@lhk interesting, cheers for the temp fix.

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

3 participants