vue.config.js启用开发环境的sourcemap

修改如下:

module.exports = {
  // ... many config ...
  productionSourceMap: process.env.NODE_ENV === 'development',
  // ... many config ...
  configureWebpack: {
    devtool: process.env.NODE_ENV === 'development' ? 'source-map' : undefined,
    // ... many config ...
  }
}

另:上述的development要看你本地配置,有的是dev

Leave a Reply

Your email address will not be published. Required fields are marked *