Open maxsultan-aumni opened 3 months ago
We worked around this by adding a tsconfig.json like:
{
"extends": "./tsconfig.base.json"
}
In the root of the project. Definitely feels hacky.
Any update on this?
Any update on this?
Got the same issue as of nx v20
@ndcunningham ?
We worked around this by adding a tsconfig.json like:
{ "extends": "./tsconfig.base.json" } In the root of the project. Definitely feels hacky.
where exactly did you add this?
We worked around this by adding a tsconfig.json like: { "extends": "./tsconfig.base.json" } In the root of the project. Definitely feels hacky.
where exactly did you add this?
At the root of the whole monorepo
Current Behavior
Nx is unable to resolve the baseUrl for a library inside thhe NxTsconfigPathsWebpackPlugin although baseUrl exists in tsconfig.base.json and we have extended that file all the way to the local tsconfig.json in cypress and tsconfig.json in the library. This causes imports from other libraries with paths specified in tsconfig.base.json to throw a module resolution error.
Expected Behavior
Nx should be able to resolve the base url when running cypress component tests in a next library
GitHub Repo
https://github.com/maxsultan-aumni/nx-next-cypress-component-minimal-repro
Steps to Reproduce
nx component-test shared-components
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
We were able to get this working correctly by opening
node_modules/@nx/webpack/src/plugins/nx-typescript-webpack-plugin/nx-tsconfig-paths-webpack-plugin.js
and adding a baseUrl on line 32running
rm -rf node_modules/.cache
rerunning
nx component-test shared-components