You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
@swc/cli seems to reuse config somewhere under the hood #97
When invoking swcDir() programmatically in the same process for two separate builds (ESM then CommonJS), the second call seems to reuse some parts of the config. As a result, even though I pass swcOptions.module.outFileExtension: 'cjs' on the second run, all import-path rewrites still use .mjs. If I comment out the ESM build, the CJS build works correctly—but running both back-to-back, the first invocation “wins” and contaminates the second somehow.
Thomas Mattheussen (@thomasmattheussen) the new version is out check out if you see the bug is still there or see any bug or issue just create a PR I would love to work on that ❤
Activity
CodeMan62 commentedon Apr 23, 2025
Donny/강동윤 (@kdy1) if you want i can take a look and try to reproduce and propose a fix with your permission!
kdy1 commentedon Apr 23, 2025
It would be nice, thank you!
CodeMan62 commentedon Apr 24, 2025
Donny/강동윤 (@kdy1) the issue is realted to this repo https://github.com/swc-project/pkgs so we have to fix this in
pkgsrepo so should I create the PR directly inpkgsor something else??kdy1 commentedon Apr 24, 2025
You should send a PR to
pkgsrepo I guessCodeMan62 commentedon Apr 25, 2025
Done Donny/강동윤 (@kdy1) but there are some problems we should discuss in that PR
fix(cli): Fix configuration reuse issue in swcDir() by deep clone (#95)
thomasmattheussen commentedon May 6, 2025
Great! Thanks for fixing this so quickly! हिमांशु (@CodeMan62) Donny/강동윤 (@kdy1) 🙌
Any idea when this will be released?
kdy1 commentedon May 6, 2025
I published a new version
CodeMan62 commentedon May 6, 2025
Thomas Mattheussen (@thomasmattheussen) the new version is out check out if you see the bug is still there or see any bug or issue just create a PR I would love to work on that ❤
thomasmattheussen commentedon May 7, 2025
I think something went wrong with publishing. I get this error now:
I assume this is due to #96
When I check my node_modules folder, the /lib folder is not there in the @swc/cli package.
thomasmattheussen commentedon May 8, 2025
Okay, that seems fixed with 0.7.5 👍
हिमांशु (@CodeMan62) But now I also get this issue: #101
kdy1 commentedon May 12, 2025
Reopening as #95 is reverted.
CodeMan62 commentedon May 12, 2025
will investigate it again and make sure to fix it Donny/강동윤 (@kdy1)