-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
If set type: module
package.json, ts path-alias not replace, and can not resolve alias path module.
#10267
Comments
Looks like |
so what it means is, when |
Partially, there's still more to it than just In short: it's something we're working on and monitoring, but it's gonna take a while |
Buffff that seems to be a huge n important, anyway thanks a lot for working on it and on this amazing framework, gonna be expecting the ESM compatibility changes. |
I had the same problem. How did you solve it |
That's the neat thing about esm/cjs interop, you don't. Most likely your situation can be solved another way like changing an extension to Worth noting that https://github.com/privatenumber/tsx is often mentioned in https://github.com/dividab/tsconfig-paths issues, it looks like a viable alternative. |
Is there an existing issue for this?
Current behavior
Can't replace alias path if file in nested-folder, but in root dir such as
/src
replace correctly.transform to:
Minimum reproduction code
https://stackblitz.com/edit/nestjs-typescript-starter-pnhuer?file=dist/app.module.js&terminal=start
Steps to reproduce
Expected behavior
replace tsc alias path.
Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
@nestjs/cli
NestJS version
9.0.11
Packages versions
Node.js version
v16.14.2
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: