-
Notifications
You must be signed in to change notification settings - Fork 213
Conversation
* Renamed the preset to webextension * Deleted unwanted configs from the web preset * Store hot-update.{js, json} files in build/hot/ * Stop using hashes because it's not useful for web extensions. Also, the main html and js files need to be referenced in manifest.json and so it becomes hard to reference them if they have hashes.
- Also rebase on neutrino ^8.0.0 - `start` uses now dev/ (files to copy are also watched) - `build` uses build/ -
Built extension is now in `build/extension` ZIP/XPI files are in `build`
+ Read manifest to find the entries automatically + Avoid creating useless HTML for content scripts & background.js + Keep entry structure `popup/popup.js -> popup/popup.html`
Problems
|
To update here, we made significant changes in #852 that eliminates the Neutrino CLI. To continue forward with this, we would need to change this to instead output the config required for webext to consume the middleware. Are you still willing to pick up on this? |
If I understood well, in webext-config.js, it would be like this:
Where neutrino().webext() is the default config from the middleware (like in |
Hi! Yes that sounds right. After #852, we no longer have a Neutrino CLI that calls various tools by their node API, and instead rely on the tool's own CLIs / native config files. I'm not very familiar with web extensions, but reading through the web-ext package docs it seems that it will auto-detect a file named That said, I can't tell from skimming through this PR whether it used to invoke the webpack build at all? (I guess the If it did, then perhaps this preset needs to change to using the webpack plugin instead? (Since otherwise two separate CLIs would have to be run sequentially) A couple of other things I spotted in the PR:
Hope that helps :-) |
Closing this out for now since there's no activity. If you or someone else has a chance to work through the suggested changes above, happy to answer any questions you might have :-) |
Creating web extension easily over webpack and web-ext
See the README.md in webextension/ for more information.
Note
Repository for testing: webextension-neutrino-test