added sourcemaps support to scss-loader and css-loader

This commit is contained in:
Johan Roxendal 2017-05-09 13:24:55 +02:00
parent 92bbacbbdf
commit 63568ceb24
2 changed files with 4 additions and 4 deletions

View File

@ -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)
}

View File

@ -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')
},