-
Notifications
You must be signed in to change notification settings - Fork 78
General Information
Warning, Extension Reloader Plugin was not enabled! It runs only on webpack --mode=development (v4 or more) or with NODE_ENV=development (lower versions).
This means that the webpack option.mode isn't "development", and the plugin will not be included on the building process. On older versions than v4, use this value on the environment variable NODE_ENV. To not see this warning, make sure to not add this plugin on a non development build, on your Webpack configuration.
Background script entry is required
Background script webpack entry not found/match the provided on 'manifest.json' or 'entry.background' option of the plugin.
The error is raised whenever a background script is provided through the plugin options or inside manifest.json
but it simply doesn't match (or don't exist) within the webpack entries:
entry: {
//...
background: './my-awesome-background.js' // entry => background
},
//...
plugins: [
new ExtensionReloader({
//...
entries: {
// ...
background: 'background-script' // background-script != background (causes this error)
}
})
]
Without the background script, Webpack Extension reloader is unable to access the extension lifecycle through the browser.runtime to execute the proper hot reload.
If your extension doesn't have background script, at least provide an empty background.js
on both manifest.json and Webpack plugin config, on development mode.
Background script on manifest is required
If you're using the manifest on the plugin option, but inside of it there's no background.scripts
entry,
will cause this error to be thrown.
Please make sure to provide at least one background:
{
"manifest_version": 2,
"name": "Webpack Chrome Extension Reloader Sample",
"version": "0.1",
"background": {
"scripts": [
"background.bundle.js"
]
},
}