Skip to content

Conversation

@0x6362
Copy link
Contributor

@0x6362 0x6362 commented Nov 13, 2024

This makes the dev experience a bit nicer by enabling hot reloading of extension background code.

TODO

  • fix wonky import ES6/CommonJS for the plugin module

TODO: fix wonky import ES6/CommonJS
@artemave
Copy link
Owner

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'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants