Full of red, desperate for honey
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"
}
]
]
}
I don’t know why it works, I don’t know why it works. Anyway, it’s fine.
Reference: https://github.com/timarney/react-app-rewired/issues/84