We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Having updated @swc-node/register to v1.5.6 SWC stopped transpiling module aliases where the exact same setup works without issues for v1.5.4.
@swc-node/register
v1.5.6
v1.5.4
Structure:
src/app.ts
src/properties.ts
My app.ts:
app.ts
import {LogCategories} from '@root/properties' console.log(LogCategories.dummy)
My properties.ts:
properties.ts
export enum LogCategories = { dummy = 'dummy' }
My tsconfig.json:
tsconfig.json
{ "compilerOptions": { "baseUrl": "./", "outDir": "./.build", "target": "ES2021", "esModuleInterop": true, "paths": { "@root/*": ["src/*"] }, "moduleResolution":"node" }, "exclude": [ "node_modules" ] }
My .swcrc:
.swcrc
{ "test": ".ts$", "jsc": { "parser": { "syntax": "typescript", "tsx": false, "decorators": false, "dynamicImport": true }, "target": "es2021" }, "module": { "type": "commonjs" } }
My execution command: node --inspect=7777 -r @swc-node/register ./src/app.ts
node --inspect=7777 -r @swc-node/register ./src/app.ts
Error message I am getting in 1.5.6: Error: Cannot find module '@root/properties'
Error: Cannot find module '@root/properties'
Other dependencies:
Have you encountered similar issue or able to advise what may cause it?
The text was updated successfully, but these errors were encountered:
Maybe relate with: swc-project/swc#6930
Sorry, something went wrong.
@Brooooooklyn Sorry, forgot to mention, it's Mac OS, WebStorm.
Brooooooklyn
Successfully merging a pull request may close this issue.
Having updated
@swc-node/register
tov1.5.6
SWC stopped transpiling module aliases where the exact same setup works without issues forv1.5.4
.Structure:
src/app.ts
src/properties.ts
My
app.ts
:My
properties.ts
:My
tsconfig.json
:My
.swcrc
:My execution command:
node --inspect=7777 -r @swc-node/register ./src/app.ts
Error message I am getting in 1.5.6:
Error: Cannot find module '@root/properties'
Other dependencies:
Have you encountered similar issue or able to advise what may cause it?
The text was updated successfully, but these errors were encountered: