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

Support ESM plugins and async plugin hooks #698

Open
vjpr opened this issue Oct 22, 2021 · 0 comments
Open

Support ESM plugins and async plugin hooks #698

vjpr opened this issue Oct 22, 2021 · 0 comments

Comments

@vjpr
Copy link

vjpr commented Oct 22, 2021

Issue description or question

Error [ERR_REQUIRE_ESM]: require() of ES Module ./xxx/quokka-plugin-live/index.js from ./index.js not supported.
Instead change the require of ./xxx/quokka-plugin-live/index.js in ./index.js to a dynamic import() which is available in all CommonJS modules.
    at Array.forEach (<anonymous>)
    at new Promise (<anonymous>)

I need to run some async code in a hook. This would allow to dynamic import ESM modules.

Ideally I would prefer to write an ESM module for the entire plugin.

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

No branches or pull requests

2 participants