跑步时
npm run build
Run Code Online (Sandbox Code Playgroud)
我遇到了来自 uglify 的与 es6 相关的语法错误,所以我猜 babel 没有正确处理节点模块(秒到分钟)。
我的 .babelrc
{
"presets": ["es2015", "stage-0"],
"plugins": ["transform-runtime"],
"comments": false,
"env": {
"test": {
"plugins": [ "istanbul" ]
}
}
}
Run Code Online (Sandbox Code Playgroud)
我的 Webpack 配置:
var path = require('path')
var config = require('../config')
var utils = require('./utils')
var projectRoot = path.resolve(__dirname, '../')
var env = process.env.NODE_ENV
// check env & config/index.js to decide whether to enable CSS source maps for the
// various preprocessor loaders added to vue-loader at the …Run Code Online (Sandbox Code Playgroud)