I have these paths in my tsconfig.json:
{
"compilerOptions": {
"lib": [
"es2020"
],
"module": "NodeNext",
"experimentalDecorators": true,
"moduleResolution": "NodeNext",
"sourceMap": true,
"target": "es2020",
"noImplicitAny": false,
"paths": {
"@/*": ["./src/*"],
"src/*": ["./src/*"],
}
}
}
The issue is when I run tsc the import paths aren't rewritten, so I end up with this in the generated javascript file:
import ResourceType from '@/enums/ResourceType.js';
How should I configure tsconfig or the 'compilation' process to do path substitution? This is for a server side nodejs app.