We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
const { parse } = await import("acorn");
const { parse } = await Promise.resolve(/* import() */ ).then(__webpack_require__.t.bind(__webpack_require__, "acorn", 23));
We should support keep dynamic import in CJS output, thus avoid importing extra runtime code and keeping import existing.
esbuild use supported and add an options dynamic-import to control it.
dynamic-import
And in Modern.js Module, we deal like below
https://github.com/web-infra-dev/modern.js/blob/f624878a961da8e53a8181d8bf3591fe8c5da8b5/packages/solutions/module-tools/src/builder/esbuild/index.ts#L207-L209
supported: { 'dynamic-import': buildType === 'bundle' || format !== 'cjs', },
The text was updated successfully, but these errors were encountered:
fi3ework
Successfully merging a pull request may close this issue.
What problem does this feature solve?
Input
Rslib CJS output
What expected
We should support keep dynamic import in CJS output, thus avoid importing extra runtime code and keeping import existing.
What does the proposed API look like?
esbuild use supported and add an options
dynamic-import
to control it.And in Modern.js Module, we deal like below
https://github.com/web-infra-dev/modern.js/blob/f624878a961da8e53a8181d8bf3591fe8c5da8b5/packages/solutions/module-tools/src/builder/esbuild/index.ts#L207-L209
The text was updated successfully, but these errors were encountered: