I'm facing an issue with a Next.js project bootstraped with nx and VS Code:
When I try to auto-import a component using VS Code, it will generate an absolute import which immediately triggers the @nrwl/nx/enforce-module-boundaries eslint rule, making the current file invalid.
For example, with folder structure:
apps/my-app/
pages/
entity/
new/
index.tsx
components/
Loading.tsx
The generated import will be:
// in my-app/pages/entity/new/index.tsx
import Loading from 'apps/my-app/components/Loading'
While I expect:
import Loading from '../../../components/Loading'
VS Code has a setting to always use relative paths for imports, but that will prevent me from importing libraries in the proper way (@scope/lib).
Is there any possible setup that can make auto imports work as expected?