Open Nick-Lucas opened 1 year ago
A common pattern with Nx is to have a library with its imports not in the main index.ts, this is achieved just by adding a glob path to tsconfig.json
index.ts
tsconfig.json
"paths": { "@org/lib": ["libs/lib/src/index.ts"], "@org/lib/*": ["libs/lib/src/*"] }
When using rspack though, this seems to not work, as it can't resolve the import:
// works import { a } from "@org/lib"; // FIXME: this import fails at build-time as unresolvable import { bar } from "@org/lib/test-import";
Minimal reproduction here, it's just 1 app 1 lib and 1 deep import: https://github.com/Nick-Lucas/nx-spack-import-repro
any solution for this?
A common pattern with Nx is to have a library with its imports not in the main
index.ts
, this is achieved just by adding a glob path totsconfig.json
When using rspack though, this seems to not work, as it can't resolve the import:
Minimal reproduction here, it's just 1 app 1 lib and 1 deep import: https://github.com/Nick-Lucas/nx-spack-import-repro