添加jsconfig.json文件
{
“compilerOptions”: {
“baseUrl”: “./”,
“paths”: {
“@/": ["./src/”],
},
“target”: “ES6”,
“module”: “commonjs”,
“jsx”: “react”,
“allowSyntheticDefaultImports”: true
},
“exclude”: [“node_modules”]
}
需要重新打开编辑器,方可生效。
添加jsconfig.json文件
{
“compilerOptions”: {
“baseUrl”: “./”,
“paths”: {
“@/": ["./src/”],
},
“target”: “ES6”,
“module”: “commonjs”,
“jsx”: “react”,
“allowSyntheticDefaultImports”: true
},
“exclude”: [“node_modules”]
}
需要重新打开编辑器,方可生效。