エラーを解決します:モジュールのビルドに失敗しました(./node_modules/babel-loader/lib/index.jsから)

赤くて、はちみつに必死

npm install npm -g
npm install --save core-js@^3
npm install babel-plugin-import --save

rm -rf node_modules
rm package-lock.json
npm cache clear --force

yarn install

 packages.json:

"babel": {
        "presets": [
            "@babel/env", "@babel/react"
        ],
        "plugins": [
            [
                "import",
                {
                    "libraryName": "antd",
                    "style": "css"
                }
            ]
        ]
    }

なぜ機能するのか、なぜ機能するのかわかりません。とにかく、問題ありません。

参照:https//github.com/timarney/react-app-rewired/issues/84

おすすめ

転載: blog.csdn.net/geeksoarsky/article/details/99777723
おすすめ