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

Building for multiple targets #27

Open
tgroutars opened this issue Dec 19, 2018 · 4 comments
Open

Building for multiple targets #27

tgroutars opened this issue Dec 19, 2018 · 4 comments

Comments

@tgroutars
Copy link
Contributor

As there are a few minor differences between browsers (e.g. in the expected fields of manifest.json), I'm trying to get my project to create multiple builds. I was wondering how you would go about doing that.

One problem I encounter is that this plugin expects the file name to be exactly manifest.json. This means i need to put the different versions of the manifest (chrome, firefox, safari) in different folders. If I do this, parcel creates a folder named __ to support the fact I'm going up the directory tree to include my files. The only problem is the build doesn't work then, since apparently we can't use _ in filenames in an extension build.

Did you try this before, and how would you handle it? I wonder if it's something this plugin should support, or if that's something I should handle in my project

@tgroutars
Copy link
Contributor Author

One way of handling it would be to support manifest.chrome.json, manifest.firefox.json,...
That said, this syntax is already used to support manifest.<NODE_ENV>.json so it might get confusing. @kevincharm What do you think?

@Cl00e9ment
Copy link

It would be really useful. The #33 pull request already handles that. I hope it will be merged soon.

@Cl00e9ment
Copy link

Since I really needed that feature, I made a fork and implemented a "dynamic manifest". Everything is explained in the README.md.

The module is available here. I could have made a simple pull request instead of another module, but it's not retro-compatible (because there is no more such thing as manifest overrides) so I think this is the correct way to do.

@fregante
Copy link

fregante commented Apr 4, 2020

@tgroutars @Cl00e9ment is this reeeeaallly needed? What changes do you need?

Chrome does complain about unrecognized fields, but it still works, and nobody else cares.

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