运行时遇到的问题
Uncaught TypeError: Cannot assign to read only property ‘exports’ of object ‘#
原因:根据字面意思,猜测是解析JS的时候不认识 exports
解决:/build/webpack.base.conf.js 中,注释下面代码
1
2
3
4
5
6{
test: /\.js$/,
loader: 'babel-loader',
// include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')],
include: [resolve('src'), resolve('test')]
},