create-react-app material-ui build

时间:2018-03-30 14:17:53

标签: material-ui create-react-app

我使用的是create-react-app和material-ui @ next

我运行纱线构建后出现错误

Failed to minify the code from this file:
./node_modules/material-ui/es/Typography/Typography.js
Read more here: https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify

我如何解决此错误

1 个答案:

答案 0 :(得分:0)

运行

npx babel node_modules\material-ui --out-dir node_modules\material-ui --presets=env,react

yarn build