-
Notifications
You must be signed in to change notification settings - Fork 36
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
[Bug]: No commonjs export names annotations generated #714
Comments
Related issue: #351 |
I'll check if the exports info could be get and added from Rslib side, otherwise we might add this from Rspack side. |
In webpack we have rspack: ![]() |
@hai-x We might lose porting some code in Rspack, will take a look later. |
If you don't mind, I can help it. |
@hai-x Of course not, thank you! |
Version
System: OS: Linux 5.15 veLinux GNU/Linux 2 (lyra) 2 (lyra) CPU: (56) x64 Intel(R) Xeon(R) Platinum 8336C CPU @ 2.30GHz Memory: 99.78 GB / 109.89 GB Container: Yes Shell: 5.9 - /usr/bin/zsh npmPackages: @rslib/core: 0.3.2 => 0.3.2
Details
Background
My package need to be bundled and must has commonjs format, I don't want to double the publish size so "Ship ESM & CJS in one Package
" was not not taken into consideration.
Problem
When bundle with esbuild, a annotation will be generated:
I did not find this kind annotation in rslib output.
This will cause problems:
Reproduce link
https://esbuild.github.io/try/#YgAwLjI0LjIALS1idW5kbGUgLS1wbGF0Zm9ybT1ub2RlIC0tdGFyZ2V0PW5vZGUxNiAtLWZvcm1hdD1janMAZQBlbnRyeS5qcwBjb25zdCByZWFjdEx5bnhQbHVnaW4gPSB7fQpleHBvcnQgeyByZWFjdEx5bnhQbHVnaW4gfQ
Reproduce Steps
Create a rslib project with config below:
Create a entry at
src/index.ts
with content below:Run rslib. The bundle result contains no commonjs export names annotation
The text was updated successfully, but these errors were encountered: