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

Import using paths #43

Closed
wonderlandpark opened this issue Mar 11, 2021 · 5 comments
Closed

Import using paths #43

wonderlandpark opened this issue Mar 11, 2021 · 5 comments
Assignees
Labels
enhancement New feature or request
Projects

Comments

@wonderlandpark
Copy link
Member

Use typescript config paths.

"paths" : {
  "@util/*": ["src/util/*"]
}

Like this
@wonderlandpark
Copy link
Member Author

Good Luck

@wonderlandpark wonderlandpark added the enhancement New feature or request label Mar 11, 2021
@zero734kr zero734kr added this to To do in v2 SDK Mar 11, 2021
v2 SDK automation moved this from To do to Done Mar 11, 2021
@zero734kr
Copy link
Member

Looks like it's impossible when you use it for backend. I considered using some libs like ts-module-paths but it can only be used in development

@zero734kr
Copy link
Member

Here is a quote from microsoft/TypeScript#10866:

"paths" is designed for use with loaders that allow remapping, unlike the Node.js require().

@zero734kr
Copy link
Member

You may not have known this because you only used "paths" option with TypeScript in next.js projects that supports path remapping via webpack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants