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
Rslib 0.0.11
Dynamic import in CJS output is broken.
There are some conditions:
cjs
type: 'module'
For example, the input code is:
export async function main() { const { TsconfigPathsPlugin } = await import('tsconfig-paths-webpack-plugin'); console.log(TsconfigPathsPlugin); } main();
Run the output code, and console.log(TsconfigPathsPlugin); get undefined.
console.log(TsconfigPathsPlugin);
undefined
https://github.com/chenjiahan/rslib-repro-dynamic-import-cjs-interop
The text was updated successfully, but these errors were encountered:
Duplicated with #121.
Current workaround
output: { target: 'node', + externals: { + 'tsconfig-paths-webpack-plugin': 'import tsconfig-paths-webpack-plugin', + }, },
Sorry, something went wrong.
It will be resolved when we implement external map for webpack and Rspack, we're already working on this.
Close duplicated issue
fi3ework
No branches or pull requests
Version
Rslib 0.0.11
Details
Dynamic import in CJS output is broken.
There are some conditions:
cjs
formattype: 'module'
For example, the input code is:
Run the output code, and
console.log(TsconfigPathsPlugin);
getundefined
.Reproduce link
https://github.com/chenjiahan/rslib-repro-dynamic-import-cjs-interop
Reproduce Steps
The text was updated successfully, but these errors were encountered: