problem description
when I refer to a file using an alias, the console outputs index.ts:1:16-error TS2307: Cannot find module"@ / test.js".
related codes
/ project/test.js
{
"compilerOptions": {
"baseUrl": ".",
"rootDir": ".",
"paths": {
"@/*": ["project/*"]
},
"module": "esnext",
"target": "es6",
"lib": ["esnext", "dom"],
"moduleResolution": "node",
"experimentalDecorators": true,
"resolveJsonModule": true,
"pretty": true
},
"exclude": ["node_modules", "dist"]
}
/ index.js
import fn from "@/test";
fn();