diff --git a/.babelrc.js b/.babelrc.js new file mode 100644 index 0000000000000000000000000000000000000000..96df80013f0ad6a1e734cfae1def7407e022e720 --- /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 991e563f5e8742cc11b3c40b1b775b56a9bc9405..572201ade3e5c34a3c10f9658bbb0a170a2fb848 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",