From f0908f089d1535e6a7e17e7dfd4bfe2c907622af Mon Sep 17 00:00:00 2001 From: Clark Du Date: Thu, 4 Jan 2018 23:25:48 +0800 Subject: [PATCH] fix: chrome sourcemap issue --- lib/builder/webpack/base.config.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/builder/webpack/base.config.js b/lib/builder/webpack/base.config.js index 61ad371b1d..16e33910ac 100644 --- a/lib/builder/webpack/base.config.js +++ b/lib/builder/webpack/base.config.js @@ -18,7 +18,7 @@ const WarnFixPlugin = require('./plugins/warnfix') module.exports = function webpackBaseConfig({ name, isServer }) { const config = { name, - devtool: this.options.dev ? 'cheap-module-eval-source-map' : false, + devtool: this.options.dev ? 'cheap-eval-source-map' : false, entry: { app: null }, @@ -28,7 +28,8 @@ module.exports = function webpackBaseConfig({ name, isServer }) { chunkFilename: this.getFileName('chunk'), publicPath: (isUrl(this.options.build.publicPath) ? this.options.build.publicPath - : urlJoin(this.options.router.base, this.options.build.publicPath)) + : urlJoin(this.options.router.base, this.options.build.publicPath)), + devtoolModuleFilenameTemplate: '[absolute-resource-path]' }, performance: { maxEntrypointSize: 1000000,