Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add web-ext-plugin for auto-reloads during development #114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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