npm run dev 成功,但是启动页面浏览器报错,'exports' of object '#'
解决方法:在.babelrc文件的"plugins"添加 "transform-es2015-modules-commonjs"
产生该问题的原因是:在webpack打包的时候,可以在js文件中混用require和export。但是不能混用import 以及module.exports
。
因为webpack 2中不允许混用import和module.exports
。
Reproduced please indicate the author and the source, and error a link to this page.
text link:
//v2ci.com/49.html