Open xgqfrms opened 3 years ago
tsconfig.json alias @
webapck alias @
https://github.com/vuejs/vetur/issues/1896#issuecomment-626148690
resolve: {
extensions: ['.js', '.jsx', '.tsx', '.ts', ],
alias: {
'@': path.join(__dirname, './src')
}
},
const path = require('path');
module.exports = {
resolve: {
alias: {
'@': path.join(__dirname, 'src')
}
},
};
{
// This file is required for VSCode to understand webpack aliases
"compilerOptions": {
// This must be specified if "paths" is set
"baseUrl": ".",
// Relative to "baseUrl"
"paths": {
"@/*": ["./src/*"],
}
}
}
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": false,
"jsx": "react",
"outDir": "./dist/",
"baseUrl": ".",
"paths": {
"@src/*": ["./src/*"],
},
},
"include": [
"./src/**/*",
]
}
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": false,
"jsx": "react",
"outDir": "./dist/",
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@/components/*": ["./src/components/*"],
},
},
"include": [
"./src/**/*",
]
}
typescript @ alias bug All In One