Обновление babel-plugin-реагировать-intl ломает приложение - PullRequest
0 голосов
/ 29 апреля 2020

Я недавно обновил response-intl с 2.2.1 до 4.5 и обновил babel-plugin-реагировать-intl.

Я получаю сообщение об ошибке

Uncaught Ошибка: сборка модуля завершилась неудачно: .... / node_modules / babel-plugin-реагировать-intl / node_modules / fs-extra / lib / index. js: 5 ... require ('./ fs'),

здесь мой .babelr c

{
    "presets": [[
        "@babel/preset-env",
        {
          "useBuiltIns": "entry",
          "debug": true,
          "corejs": 3,
          "modules": false,
          "targets": {
            "chrome": "68",
            "ie": "11"
          }
        }
      ], "@babel/preset-react"],
    "plugins": [
        [
            "react-intl", {
                "messagesDir": "./build/messages/"
            }
        ],
        "@babel/plugin-proposal-class-properties",
        "@babel/plugin-proposal-function-bind"
    ]
}

вот мой webpack.config

const webpack = require ('webpack'); const path = require ('path');

module.exports = {
    resolve: {
        mainFields: ['browser', 'main', 'module']
    },
    entry: {
        'manager': path.join(__dirname, 'src', 'integration-manager', 'index.js'),
        'components': path.join(__dirname, 'src', 'components', 'index.js')
    },
    output: {
        path: path.resolve(__dirname, 'js'),
        filename: '[name].bundle.js',
    },
    devtool: 'source-map',
    module: {
        rules: [
            {
                test: /\.js$/,
                loader: 'babel-loader',
                include: [
                    path.resolve(__dirname, 'src', 'manager'),
                    path.resolve(__dirname, 'src', 'components'),
                ],
                exclude: [
                    path.resolve(__dirname, 'node_modules'),
                ],
                options: {
                    cacheDirectory: 'babel_cache'
                }
            },
            {
                test: /\.svg$/,
                use: [{
                    loader: '@svgr/webpack',
                    options: {
                      svgoConfig: {
                        plugins: {
                          removeViewBox: false
                        }
                      }
                    }
                  }],
            }
        ],  
    }
};
...