解决报错:Module build failed (from ./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