Open 0x6362 opened 1 week ago
I take it this one is still a draft?
$ webpack --watch
[webpack-cli] Failed to load '/home/artem/projects/translate_onhover/webpack.config.js' config
[webpack-cli] Error [ERR_REQUIRE_ESM]: require() of ES Module /home/artem/projects/translate_onhover/node_modules/web-ext-plugin/index.js from /home/artem/projects/translate_onhover/webpack.config.js not supported.
Instead change the require of index.js in /home/artem/projects/translate_onhover/webpack.config.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/home/artem/projects/translate_onhover/webpack.config.js:6:22)
at async WebpackCLI.tryRequireThenImport (/home/artem/projects/translate_onhover/node_modules/webpack-cli/lib/webpack-cli.js:225:26) {
code: 'ERR_REQUIRE_ESM'
}
This makes the dev experience a bit nicer by enabling hot reloading of extension background code.
TODO