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

Compiled code uses full path for all NPM imports #7869

Closed
Nickersoft opened this issue Aug 25, 2023 · 4 comments
Closed

Compiled code uses full path for all NPM imports #7869

Nickersoft opened this issue Aug 25, 2023 · 4 comments
Labels
Milestone

Comments

@Nickersoft
Copy link

Describe the bug

I just upgraded to the latest version of SWC and now all my compiled code uses a full path for NPM imports, which won't run for me:

image

Input code

import { Logger } from "@nestjs/common";

Config

{
  "module": {
    "type": "es6"
  },
  "jsc": {
    "baseUrl": ".",
    "target": "es2020",
    "parser": {
      "syntax": "typescript",
      "decorators": true,
      "importMeta": true
    },
    "transform": {
      "legacyDecorator": true,
      "decoratorMetadata": true
    },
    "keepClassNames": true,
    "paths": {
      "@lg/database": ["libs/database/src"],
      "@lg/notifications": ["libs/notifications/src"],
      "@lg/eventing": ["libs/eventing/src"],
      "@lg/test": ["libs/test/src"],
      "@lg/i18n": ["libs/i18n/src"],
      "@lg/authentication": ["libs/authentication/src"],
      "@lg/assessments": ["libs/assessments/src"]
    }
  }
}

Playground link

No response

Expected behavior

NPM imports should be preserved as originally written

Actual behavior

(see above)

Version

1.3.79

Additional context

No response

@kdy1
Copy link
Member

kdy1 commented Aug 25, 2023

#7864

@kdy1 kdy1 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 25, 2023
@kdy1 kdy1 added this to the v1.3.80 milestone Aug 25, 2023
@Nickersoft
Copy link
Author

@kdy1 Is this being addressed? The other issue was closed shortly after being opened.

@Nickersoft
Copy link
Author

I think you meant to reference #7863. Will keep my eye on it!

@swc-bot
Copy link
Collaborator

swc-bot commented Sep 25, 2023

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Sep 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

3 participants