I have a project using babel alias:
resolve: {
alias: {
vue: \'vue/dist/vue.js\',
\'@cmp\': resolve(\'src/components\'),
\'@service\': re
This worked for me, as suggested here (I wanted @/
to resolve to ./src/
):
{
"compilerOptions": {
"target": "es2017",
"allowSyntheticDefaultImports": false,
"baseUrl": "./",
"paths": {
"@/*": ["src/*"],
}
},
"exclude": ["node_modules", "dist"]
}
Minimal version, but I'd leave exclude
too:
{
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
}
Try creating a jsconfig.json and configuring the paths
compiler options
{
"compilerOptions": {
"baseUrl": ".",
"module": "commonjs",
"paths": {
"@cmp/*": ["./src/components/*"]
}
}
}
You can find more information about paths
and other compiler options here