mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
added sourcemaps support to scss-loader and css-loader
This commit is contained in:
parent
92bbacbbdf
commit
63568ceb24
@ -7,9 +7,9 @@ export function extractStyles () {
|
|||||||
export function styleLoader (ext, loader = []) {
|
export function styleLoader (ext, loader = []) {
|
||||||
if (extractStyles.call(this)) {
|
if (extractStyles.call(this)) {
|
||||||
return ExtractTextPlugin.extract({
|
return ExtractTextPlugin.extract({
|
||||||
use: ['css-loader?minimize'].concat(loader),
|
use: ['css-loader?minify&sourceMap'].concat(loader),
|
||||||
fallback: 'vue-style-loader'
|
fallback: 'vue-style-loader?sourceMap'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return ['vue-style-loader', 'css-loader'].concat(loader)
|
return ['vue-style-loader?sourceMap', 'css-loader?sourceMap'].concat(loader)
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ export default function ({ isClient }) {
|
|||||||
'css': styleLoader.call(this, 'css'),
|
'css': styleLoader.call(this, 'css'),
|
||||||
'less': styleLoader.call(this, 'less', 'less-loader'),
|
'less': styleLoader.call(this, 'less', 'less-loader'),
|
||||||
'sass': styleLoader.call(this, 'sass', 'sass-loader?indentedSyntax'),
|
'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'),
|
'stylus': styleLoader.call(this, 'stylus', 'stylus-loader'),
|
||||||
'styl': styleLoader.call(this, 'stylus', 'stylus-loader')
|
'styl': styleLoader.call(this, 'stylus', 'stylus-loader')
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user