Open parlay96 opened 4 years ago
提示:Value expectedjsonc(516) 是不是.babelrc只支持JSON内容?
.babelrc is a json, can not write function.
you can config the babel-loader by webpack.config.js, like
module: { rules: [ { test: /\.js$/, loader: "babel-loader", exclude: /node_modules/, options: { plugins: [ ["import", { "libraryName": "xxx", "libraryDirectory": "lib", "camel2DashComponentName": false, "style": (name) =>
${name}/style/2x }] ] } } ] }
["import", { "libraryName": "antd", "style": (name) =>
${name}/style/2x
}] 你确定这样写不报错吗。 报这样的错误(name) => 这个不行