这是我的webpack配置:
module: {
rules: [
{
test: /\.js[x]?$/,
exclude: /node_modules/,
use: [
{
loader: 'babel-loader',
options: {
"cacheDirectory": true,
"plugins": ["react-loadable/babel"],
"presets": [["env", {
"targets": {
"node": "current"
}
}], "stage-2", "react"]
}
},
'eslint-loader'
]
},
{
test: /\.(jpe?g|gif|png|svg|eot|woff|woff2|ttf)$/,
loader: "url-loader?limit=5000&name=[path][name].[ext]"
},
{
test: /\.(jpe?g|gif|png|svg)$/,
loader: 'file-loader?name=[path][name].[ext]'
}
],
},
我尝试将节点从12降级到较低版本(10),并重复了npm安装。我是Webpack的新手,但仍然会为可能导致此问题的问题挠头。这仅适用于react-plaid-link插件。