-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
@swc-node/register — Files are not transpiled on Windows with tsconfig.json present #8639
Comments
I've narrowed the issue down. TL;DR
This issue isn't present without Detailed DescriptionThe string passed to the |
On a second note, the check on Windows will never work anyways because Related: swc-project/swc-node#710 (comment) |
I've mentioned in my comment here, to fix the issue the protocol can be removed using |
Describe the bug
I cannot reproduce this with the playground or CLI, only with
@swc-node/register
This issue ONLY occurs when a
tsconfig.json
is present. Even if it is completely blank (0 bytes; not even{}
). Same issue occurs with recommendedtsconfig.json
compilerOptions
. Iftsconfig.json
is deleted, this issue doesn't occur.Steps to reproduce
pnpm init
pnpm add -D @swc-node/register
./index.ts
.touch tsconfig.json
node --import @swc-node/register/esm-register ./index.ts
Input code
Config
No config.
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.4.0&code=H4sIAAAAAAAAAz2OzQrCMBCE74W8w9yqr2ART97Ed4jrtgbyx24OQum7a5roZZaZD3bGhZykgN9ZWBWzpICxu3Eyg2v8xT5w6biZSs3wZPJWGItPD%2BuxmgGINrBmS4xrf7vHgIuFZa7glsj6fw6Q5nuKxJcTtIiLy9TIVs9XttpFKWqBzRnn3%2BDDcV%2FxAXF5lWHGAAAA&config=H4sIAAAAAAAAA1VPOw7DIAzdOQXy3KFi6NA79BCIOhERAYQdqSjK3QsJpM1mv4%2Ff8yqkhIkMPOVaxrJEnQjTuReEsmf9KQhwjkgm2chw6yxTpQbtCHdoOxhgnUbk6kJSd6WaA1wIhN3RsNl6O%2BT%2FTBPmmJDoKqxS7UeH10TRUmEO72Un2y%2B179HgAT9RDzsPg6VXd3JaUGxfBMLf3xcBAAA%3D
SWC Info output
Above output seems broken.
pnpm --version: 18.15.2
Expected behavior
Node shouldn't throw a syntax error.
Actual behavior
No response
Version
See above.
Additional context
No response
The text was updated successfully, but these errors were encountered: