Merge pull request #687 from jroxendal/css-sourcemaps

added sourcemaps support to scss-loader and css-loader
This commit is contained in:
Sébastien Chopin 2017-05-09 16:34:42 +02:00 committed by GitHub
commit 892543eb1d
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')
},