Wei
Wei
Duplicated with https://github.com/web-infra-dev/rslib/issues/121. Current workaround ```diff 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.
Does other tools support patch `mainFiles` in bundleless mode as of now? For bundle mode, support `index` in `mainFields` is fine. In bundleless mode, I feel it's too lose somehow.
esbuild by default could handle `index` mainFiles, but when the target module is externalized, it will not adding `index` as well. https://esbuild.github.io/try/#YgAwLjI0LjAALS1idW5kbGUgLS1mb3JtYXQ9ZXNtIC0tZXh0ZXJuYWw6Jy4vYScAZQBlbnRyeS5qcwBpbXBvcnQgeCBmcm9tICcuL2EnCmV4cG9ydCB7IHggfQAAYS9pbmRleC5qcwBleHBvcnQgZGVmYXVsdCA1 If we wish to support this feature, we...
> We should also handle when ./folder/index.ts and ./folder.ts exists at the same time We could just follow Rspack's default order. > there may also be .ts, .tsx, .jsx file...
There's not a rational way to find the `/index` by leveraging Rspack without `getResolve` function, there are some workarounds such as manually check before resolving, but that's a bypass implementation...
Reproduced, tracking.
"module-import" lacks fallback external type, will fix in webpack and Rspack.
Nice catch. I tried to trigger the panic with Rspack alone, it will not exit.
Nice catch. Thank you.