Open chenjiahan opened 6 days ago
Duplicated with https://github.com/web-infra-dev/rslib/issues/121.
Current workaround
output: {
target: 'node',
+ externals: {
+ 'tsconfig-paths-webpack-plugin': 'import tsconfig-paths-webpack-plugin',
+ },
},
It will be resolved when we implement external map for webpack and Rspack, we're already working on this.
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