Browse Source

无JIRA任务 chore: 给src配置个别名,便于路径引入

es6
Zhenfei.Li 2 years ago
parent
commit
40b12b865e
  1. 3
      tsconfig.json
  2. 3
      webpack/webpack.common.js

3
tsconfig.json

@ -22,6 +22,9 @@
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"emitDeclarationOnly": true, "emitDeclarationOnly": true,
"allowJs": true, "allowJs": true,
"paths": {
"@/*": ["./src/*"]
}
}, },
"include": [ "include": [
"typescript/*.ts", "typescript/*.ts",

3
webpack/webpack.common.js

@ -33,6 +33,9 @@ module.exports = {
resolve: { resolve: {
mainFields: ['module', 'main'], mainFields: ['module', 'main'],
extensions: ['.js', '.ts'], extensions: ['.js', '.ts'],
alias: {
"@": path.resolve(__dirname, '../src'),
},
}, },
module: { module: {
rules: [ rules: [

Loading…
Cancel
Save