From 63568ceb247e3c9b86c3a0f6c0b07581a6f1cb1b Mon Sep 17 00:00:00 2001 From: Johan Roxendal Date: Tue, 9 May 2017 13:24:55 +0200 Subject: [PATCH] added sourcemaps support to scss-loader and css-loader --- lib/webpack/helpers.js | 6 +++--- lib/webpack/vue-loader.config.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/webpack/helpers.js b/lib/webpack/helpers.js index 3b67924213..e3fae8288e 100755 --- a/lib/webpack/helpers.js +++ b/lib/webpack/helpers.js @@ -7,9 +7,9 @@ export function extractStyles () { export function styleLoader (ext, loader = []) { if (extractStyles.call(this)) { return ExtractTextPlugin.extract({ - use: ['css-loader?minimize'].concat(loader), - fallback: 'vue-style-loader' + use: ['css-loader?minify&sourceMap'].concat(loader), + fallback: 'vue-style-loader?sourceMap' }) } - return ['vue-style-loader', 'css-loader'].concat(loader) + return ['vue-style-loader?sourceMap', 'css-loader?sourceMap'].concat(loader) } diff --git a/lib/webpack/vue-loader.config.js b/lib/webpack/vue-loader.config.js index 81eb2b9ba9..9dc590107d 100644 --- a/lib/webpack/vue-loader.config.js +++ b/lib/webpack/vue-loader.config.js @@ -18,7 +18,7 @@ export default function ({ isClient }) { 'css': styleLoader.call(this, 'css'), 'less': styleLoader.call(this, 'less', 'less-loader'), 'sass': styleLoader.call(this, 'sass', 'sass-loader?indentedSyntax'), - 'scss': styleLoader.call(this, 'sass', 'sass-loader'), + 'scss': styleLoader.call(this, 'sass', 'sass-loader?sourceMap'), 'stylus': styleLoader.call(this, 'stylus', 'stylus-loader'), 'styl': styleLoader.call(this, 'stylus', 'stylus-loader') },