You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a webpack plugin that allows you to bring hot reloading functionality to WebExtensions, essentially `webpack-dev-server`, but for (WebExtensions)[https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions].
34
+
This is a webpack plugin that brings hot reloading functionality to WebExtensions, essentially resembling `webpack-dev-server` but for [WebExtensions](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions).
35
35
36
-
This is a fork from[`webpack-extension-reloader`](https://github.com/rubenspgcavalcante/webpack-extension-reloader), maintained and updated by the team here at Simplify. The goal here is to continue to support the latest version of webpack (`webpack-extension-reloader` only supports webpack v4) while adding new improvements (i.e. HMR).
36
+
This project is a fork of[`webpack-extension-reloader`](https://github.com/rubenspgcavalcante/webpack-extension-reloader), maintained and updated by the team at Simplify. The goal is to continue supporting the latest version of webpack (`webpack-extension-reloader` only supports webpack v4) while introducing new improvements, such as HMR.
37
37
38
38

39
39
40
-
**Note**: This plugin doesn't support [**Hot Module Replacement (HMR)**](https://webpack.js.org/concepts/hot-module-replacement/) yet.
40
+
**Note**: This plugin does not support [**Hot Module Replacement (HMR)**](https://webpack.js.org/concepts/hot-module-replacement/) yet.
41
41
42
42
## How to use
43
43
44
44
### Using as a plugin
45
45
46
-
Add `webpack-ext-reloader` to the plugins section of your webpack configuration file. Note that this plugin don't outputs the manifest (at most read it to gather information).
47
-
For outputing not only the `manifest.json` but other static files too, use `CopyWebpackPlugin`.
46
+
Add `webpack-ext-reloader` to the plugins section of your webpack configuration file. This plugin does not output the manifest; it might read it for information at most. For outputting not only the `manifest.json` but other static files as well, use `CopyWebpackPlugin`.
48
47
49
48
```js
50
49
constExtReloader=require('webpack-ext-reloader');
@@ -58,7 +57,7 @@ plugins: [
58
57
]
59
58
```
60
59
61
-
You can point to your `manifest.json file`...
60
+
You can point to your `manifest.json` file...
62
61
63
62
```js
64
63
plugins: [
@@ -81,7 +80,7 @@ module.exports = {
81
80
background:'./my-background-script.js',
82
81
popup:'popup',
83
82
},
84
-
//...
83
+
//...
85
84
plugins: [
86
85
newExtReloader({
87
86
port:9090, // Which port use to create the server
@@ -97,89 +96,86 @@ module.exports = {
97
96
}
98
97
```
99
98
100
-
**Note I**: `entry` or `manifest`are needed. If both are given, entry will override the information comming from `manifest.json`. If none are given the default `entry` values (see above) are used.
99
+
**Note I**: Either `entry` or `manifest`is needed. If both are provided, the `entry` will override the information from `manifest.json`. If neither is provided, the default `entry` values (as shown above) are used.
101
100
102
-
And then just run your application with Webpack in watch mode:
**Note II**: You need to set `--mode=development` to activate the plugin (only if you didn't set on the webpack.config.js already) then you need to run with `--watch`, as the plugin will be able to sign the extension only if webpack triggers the rebuild (again, only if you didn't set on webpack.config).
107
+
**Note II**: You need to set `--mode=development` to activate the plugin. If you didn't set it in the webpack.config.js already, you need to run with `--watch` since the plugin will be able to sign the extension only if webpack triggers the rebuild.
109
108
110
109
### Multiple Content Script and Extension Page support
111
110
112
-
If you use more than one content script or extension page in your extension, like:
111
+
If your extension uses more than one content script or extension page, like:
| --config | webpack.config.js |Path to the webpack configuration file |
163
+
| --port | 9090 |Port to run the server on |
164
+
| --manifest ||Path to the extension's**manifest.json** file|
165
+
| --content-script | content-script |**Entry/entries** name(s) for the content script(s)|
166
+
| --background | background |**Entry** name for the background script|
167
+
| --extension-page | popup |**Entry/entries** name(s) for the extension page(s)|
168
+
| --no-page-reload || Disable auto-reloading of all **pages**running the plugin|
175
169
176
-
Every time content or background scripts are modified, the extension is reloaded :)
177
-
**Note:** the plugin only works on**development** mode, so don't forget to set the NODE_ENV before run the command above
170
+
Whenever content or background scripts are modified, the extension will reload.
171
+
**Note**: This plugin only works in**development** mode. Remember to set the NODE_ENV before running the commands above.
178
172
179
173
### Contributing
180
174
181
-
Please before opening any **issue** or **pull request** check the [contribution guide](/.github/CONTRIBUTING.MD).
175
+
Before opening any **issue** or **pull request**, please refer to the [contribution guide](/.github/CONTRIBUTING.MD).
182
176
183
177
### License
184
178
185
-
This project has been forked from [rubenspgcavalcante/webpack-extension-reloader](https://github.com/rubenspgcavalcante/webpack-extension-reloader), which is licensed under the [MIT license](https://github.com/rubenspgcavalcante/webpack-extension-reloader/blob/master/LICENSE). All changes made in this fork have been licensed via the [MIT license](https://github.com/SimplifyJobs/webpack-ext-reloader/blob/master/LICENSE).
179
+
This project is a fork from [rubenspgcavalcante/webpack-extension-reloader](https://github.com/rubenspgcavalcante/webpack-extension-reloader), which is licensed under the [MIT license](https://github.com/rubenspgcavalcante/webpack-extension-reloader/blob/master/LICENSE
180
+
181
+
). All modifications made in this fork are also licensed under the [MIT license](https://github.com/SimplifyJobs/webpack-ext-reloader/blob/master/LICENSE).
0 commit comments