Skip to content

General Information

Rubens Pinheiro edited this page May 7, 2019 · 2 revisions

Warnings:

WCER-W1

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.

Errors:

WCER-E1

Background script entry is required. .

The error is raised whenever no background script is provided through the plugin options. Without the background script, Webpack Extension reloader is unable to access the extension lifecycle through the browser.runtime to execute the proper hot reload.

entry: {
    //...
    background: './background.js' // *This is required
},
//...
plugins: [
    new ExtensionReloader({
      //...
      entries: { 
        // ...
        background: 'background' // *This is required
      }
    })
]

If your extension don't have background script, at least provide an empty background.js on both manifest.json and Webpack plugin config, on development mode.

Clone this wiki locally