1. parcel很受欢迎,webpack太慢了,试试Parcel下一代的前端构建工具
2.Parcel很快,但缺少好多插件,没有base64,没有办法拆分打包文件....
3.总结:适合小项目
4. demo: https://github.com/yurizhang/coupon
{ "name": "coupon", "version": "1.0.0", "main": "index.js", "license": "MIT", "dependencies": { "axios": "^0.17.1", "element-react": "^1.4.5", "element-theme-default": "^1.4.13", "react": "^16.2.0", "react-dom": "^16.2.0" }, "devDependencies": { "babel-plugin-transform-object-rest-spread": "^6.26.0", "babel-preset-env": "^1.6.1", "babel-preset-react": "^6.24.1", "parcel-bundler": "^1.5.1" }, "scripts": { "start": "parcel ./src/index.html", "build": "parcel build ./src/index.js -d ./build" } }