babel-plugin-module-resolver: 自定义、重命名路径名称,如果不喜欢使用相对路径,可以使用这个插件,注意cwd必须配置,否则报错
"plugins": [
["module-resolver", {
"cwd": "babelrc",
"root": ["./"],
"alias": {
"src": "./src",
}
}]
]
"plugins": [
["module-resolver", {
"cwd": "babelrc",
"root": ["./"],
"alias": {
"src": "./src",
}
}]
]