vscode配置webpack alias支持

安装node modules resolve插件

添加jsconfig配置

https://code.visualstudio.com/docs/languages/jsconfig

{
  "compilerOptions": {
    "target": "es2017",
    "allowSyntheticDefaultImports": false,
    "baseUrl": "./",
    "paths": {
      "@/*": ["src/*"]
    }
  },
  "exclude": ["node_modules", "dist"]
}

猜你喜欢

转载自www.cnblogs.com/raind/p/12233364.html