mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-06 21:10:38 +00:00
fix sass loader with indentedSyntax
fixes #1436 query options cannot be used when options provided
This commit is contained in:
parent
0795d40bb7
commit
b931dd40ce
@ -74,7 +74,7 @@ export default function webpackBaseConfig (name) {
|
||||
},
|
||||
{ test: /\.css$/, use: this.styleLoader('css') },
|
||||
{ test: /\.less$/, use: this.styleLoader('less', 'less-loader') },
|
||||
{ test: /\.sass$/, use: this.styleLoader('sass', 'sass-loader?indentedSyntax') },
|
||||
{ test: /\.sass$/, use: this.styleLoader('sass', {loader: 'sass-loader', options: { indentedSyntax: true }}) },
|
||||
{ test: /\.scss$/, use: this.styleLoader('scss', 'sass-loader') },
|
||||
{ test: /\.styl(us)?$/, use: this.styleLoader('stylus', 'stylus-loader') },
|
||||
{
|
||||
|
@ -5,14 +5,13 @@ export default function styleLoader (ext, loaders = [], isVueLoader = false) {
|
||||
// Normalize loaders
|
||||
loaders = (Array.isArray(loaders) ? loaders : [loaders]).map(loader => {
|
||||
if (typeof loader === 'string') {
|
||||
return {
|
||||
loader,
|
||||
options: {
|
||||
sourceMap: this.options.build.cssSourceMap
|
||||
}
|
||||
}
|
||||
loader = { loader }
|
||||
}
|
||||
return loader
|
||||
return Object.assign({
|
||||
options: {
|
||||
sourceMap: this.options.build.cssSourceMap
|
||||
}
|
||||
}, loader)
|
||||
})
|
||||
|
||||
// https://github.com/postcss/postcss-loader
|
||||
|
@ -14,7 +14,7 @@ export default function vueLoader () {
|
||||
'css': this.styleLoader('css', [], true),
|
||||
'less': this.styleLoader('less', 'less-loader', true),
|
||||
'scss': this.styleLoader('scss', 'sass-loader', true),
|
||||
'sass': this.styleLoader('sass', 'sass-loader?indentedSyntax', true),
|
||||
'sass': this.styleLoader('sass', {loader: 'sass-loader', options: { indentedSyntax: true }}, true),
|
||||
'stylus': this.styleLoader('stylus', 'stylus-loader', true),
|
||||
'styl': this.styleLoader('stylus', 'stylus-loader', true)
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user