模块构建失败:ReferenceError:在使用react-plaid-link时在...中指定的未知插件“ add-module-exports”

时间:2019-12-05 14:03:31

标签: reactjs webpack build

这是我的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插件。

0 个答案:

没有答案