In my tsconfig.json I use the paths option:
"compilerOptions": {
[...]
"paths": {
"@*": ["./src/*"]
},
}
Which allows me to import files as such:
import validateToken from "@auth/jwt"; // => <root>/src/auth/jwt.ts
However ncc's module resolution is incompatible with this feature, giving the following error:
ncc: Module directory "<dir>" attempted to require "@auth/jwt" but could not be resolved, assuming external.
Something like tsconfig-paths-webpack-plugin could be used to support this configuration.
I could submit a PR for this if there are no objections.
In my
tsconfig.jsonI use thepathsoption:Which allows me to import files as such:
However ncc's module resolution is incompatible with this feature, giving the following error:
Something like
tsconfig-paths-webpack-plugincould be used to support this configuration.I could submit a PR for this if there are no objections.