diff --git a/.babelrc.js b/.babelrc.js new file mode 100644 index 00000000..96df8001 --- /dev/null +++ b/.babelrc.js @@ -0,0 +1,12 @@ +module.exports = { + plugins: [ + [ + 'babel-plugin-module-resolver', + { + alias: { + components: './src/components', + }, + }, + ], + ], +}; \ No newline at end of file diff --git a/package.json b/package.json index 991e563f..572201ad 100755 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "babel-eslint": "^8.1.2", "babel-plugin-dva-hmr": "^0.4.1", "babel-plugin-import": "^1.6.7", + "babel-plugin-module-resolver": "^3.1.1", "babel-plugin-transform-decorators-legacy": "^1.3.4", "cross-env": "^5.1.1", "cross-port-killer": "^1.0.1",