图片描述{ "name": "webpack-sample-project", "version": "1.0.0", "description": "Sample webpack project", "scripts": { "start": "webpack" }, "author": "zhang", "license": "ISC", "devDependencies": { "babel-core": "^6.18.2", "babel-loader": "^6.2.7", "babel-preset-es2015": "^6.18.0", "babel-preset-es2016": "^6.16.0", "babel-preset-react": "^6.16.0", "json-loader": "^0.5.4", "webpack": "^1.12.9", "webpack-dev-server": "^1.16.2" }}
1 回答
MMMHUHU
TA贡献1834条经验 获得超8个赞
在webpack.config.js同层级的目录里放了 .babelrc 文件没?
没的话,新建 .babelrc 文件,里面放入这一段了:
{ "presets": [ "es2015" ] }
然后再试试。
添加回答
举报
0/150
提交
取消