Skip to content
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

jsc.paths in .swcrc is not recognized. #2135

Closed
2 of 4 tasks
yuntian001 opened this issue Jun 25, 2023 · 5 comments
Closed
2 of 4 tasks

jsc.paths in .swcrc is not recognized. #2135

yuntian001 opened this issue Jun 25, 2023 · 5 comments

Comments

@yuntian001
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

When I compile with nest start-b swc , jsc.paths in .swcrc is not recognized.
It works when I use the swc --ignore \"**/*.spec.ts,src/hmr.ts\" --delete-dir-on-start --out-dir dist/ src/ command

Minimum reproduction code

This is a cli error with no corresponding replicating code

Steps to reproduce

  1. create .swc
{
  "$schema": "https://json.schemastore.org/swcrc",
  "sourceMaps": true,
  "jsc": {
    "parser": {
      "syntax": "typescript",
      "decorators": true,
      "dynamicImport": true
    },
    "transform": {
      "legacyDecorator": true,
      "decoratorMetadata": true
    },
    "paths": {
      "@/*": ["src/*"]
    },
    "baseUrl": "./"
  },
  "minify": false
}
  1. npx nest start-b swc

Expected behavior

'@/app' in the project is escaped as a relative path

Package version

10.0.3

NestJS version

10.0.3

Node.js version

16.18.0

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

@thenglong
Copy link

thenglong commented Jun 25, 2023

same issue here. it's seem to work fine on my mac but not on my windows.

{
  "$schema": "https://json.schemastore.org/swcrc",
  "sourceMaps": true,
  "jsc": {
    "parser": {
      "syntax": "typescript",
      "decorators": true,
      "dynamicImport": true
    },
    "baseUrl": "./",
    "paths": {
      "@/*": ["src/*"]
    }
  },
  "minify": false
}

@thenglong
Copy link

I think it's related to this swc-project/swc#2725

@kamilmysliwiec
Copy link
Member

Please provide a minimum reproduction repository (Git repository/StackBlitz/CodeSandbox project).

@hengkx
Copy link

hengkx commented Jul 9, 2023

Have you solved the same problem?

@hengkx
Copy link

hengkx commented Jul 9, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants