-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Cypress builder should transform tsconfig paths #1238
Comments
My team currently has a need for this as well. Maybe something like https://www.npmjs.com/package/tsconfig-paths could accomplish the same thing without the additional overhead of a bundler like webpack? |
@diginikkari could you provide a repro? |
this is to repro: nrwl/nx#1238
@vsavkin of course, here is repro repository: https://github.com/diginikkari/repro-for-issue1238 I tried to make it as clean as I could. It's just basic nx workspace with one app and one lib. tsconfig.e2e.json is modified to include lib module and changed outDir, because of that. app.spec.ts is now failing, because imported module is not found. Hope this helps. |
Closing this as a duplicate of #883 Please go there for updates regarding this issue. |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Expected Behavior
I expect that modules which are imported using path aliases in tsconfig.json would be transformed to relative paths or e.g. webpack modules.
Current Behavior
If I import module using path alias e.g.
import { ProductType} from '@project/models'
This import is not transformed by tsc and it's still found in compiled js and I get "Error: Cannot find module '@project/models'" -error.
Failure Information (for bugs)
This is know limitation with tsc. Perhaps cypress builder could use webpack which handles tsconfig paths correctly.
The text was updated successfully, but these errors were encountered: