I am trying to start a new project with npx create-nx-workspace@latest --preset=nuxt
, then create a nx lib with npx nx generate library --bundler=vite
, and then use that new lib in my nuxt project.
my project’s structure is something like:
| root
| apps
| site
tsconfig.json // this one imports tsconfig.base.json
| libs
| services
| my-service
| src
index.ts
tsconfig.base.json
I am setting a path on tsconfig.base.json
like:
{
"compilerOptions": {
"baseUrl": "."
"path": {
"@services/*": ["./libs/services/*/src/index.ts"]
}
}
}
I tried everything: setting typescript.tsConfig
stuff on the nuxt.config.ts
… using nested tsconfig
files… and nothing works properly to resolve the paths.
My VSCode can resolve the @services
module (I can click on it and jump to the correct index file), but the eslint keeps marking it as unresolved:
Plus, I get this erros when starting the dev server:
I have no idea how to set the tsconfig paths properly…. kinda desperate already…