Comments (2)
No, as the information from the manifest.json is read at the start, as a common file and using the manifest to inform about the content/bg scripts is optional, as you can pass as options to the plugin.
As you can see this plugin don't parses the manifest.json, only read it, on the compilation time (that's why you use it alongside copy-webpack-plugin).
Also added to the docs a way to use multiple manifests.json, depending on your environment (dev or prod). It's a very simple trick that can be used on all plugins on webpack :)
from webpack-extension-reloader.
During extension development I tend to add/remove things from the manifest while I discover what permissions are needed etc. It would be useful to have a mechanism that auto-copies the manifest in the event of such changes, and afterwards auto-reloads the extension in the browser.
Also, regarding dev/prod versions of the manifest, it is easier to maintain one 'base' manifest and modify that on the fly with a script than maintain separate copies. There are more cases than just dev/prod, for example, Firefox requires a manifest key when using storage.sync
,
Note that the implementation of storage.sync in Firefox relies on the Add-on ID. If you use
storage.sync
, you must set an ID for your extension using theapplicationsbrowser_specific_settings
manifest.json key.
Chrome does not support this key and will tell you your manifest is malformed if you include it.
And there are certain browser-specific things that don't look they'll be standardized anytime soon, for example,
- Chrome's plans to stop supporting the webRequest API (Firefox has not said they will drop the API, nor have they committed to keeping it)
- Chrome's use of CORB, which prevents content scripts from making cross origin requests (Firefox still allows cross origin requests from content scripts)
These differences may impact what appears in your manifest, so you could potentially have Firefox-dev, Firefox-prod, Chrome-dev, Chrome-prod, etc.
from webpack-extension-reloader.
Related Issues (20)
- Unexpected invalid url on key press in console
- Getting TypeScript errors in the type definitions file HOT 2
- Reloading the New Tab Page HOT 2
- Not working with [email protected] HOT 5
- When manifest provided, won't reload all scripts
- Crashes when `output.filename` in `webpack.config.js` is a function
- Background page (not script!) unsupported?
- Is this still maintained? HOT 3
- CSS reloading
- Check for background script breaks for more complicated output.filename rules
- an add manifest configuration array like: [base-manifest.json,firefox-manifest.json,chrome-manifest.json]
- EADDRINUSE when using with vue-cli-plugin-browser-extension HOT 5
- Cannot work with typescript config file webpack.ts
- Manifest V3 Service worker registration failed HOT 17
- background.html instead of background.js error
- get error with wepback 5 HOT 1
- Hot reload only the active tab. HOT 1
- Is there a way to disable the insertion of the webextension-polyfill into the scripts?
- Service worker registration failed. Status code: 10 HOT 1
- I would like to know if there is a webpack5 compatible version of the plugin.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webpack-extension-reloader.