mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-07 09:22:27 +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: /\.css$/, use: this.styleLoader('css') },
|
||||||
{ test: /\.less$/, use: this.styleLoader('less', 'less-loader') },
|
{ 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: /\.scss$/, use: this.styleLoader('scss', 'sass-loader') },
|
||||||
{ test: /\.styl(us)?$/, use: this.styleLoader('stylus', 'stylus-loader') },
|
{ test: /\.styl(us)?$/, use: this.styleLoader('stylus', 'stylus-loader') },
|
||||||
{
|
{
|
||||||
|
@ -5,14 +5,13 @@ export default function styleLoader (ext, loaders = [], isVueLoader = false) {
|
|||||||
// Normalize loaders
|
// Normalize loaders
|
||||||
loaders = (Array.isArray(loaders) ? loaders : [loaders]).map(loader => {
|
loaders = (Array.isArray(loaders) ? loaders : [loaders]).map(loader => {
|
||||||
if (typeof loader === 'string') {
|
if (typeof loader === 'string') {
|
||||||
return {
|
loader = { loader }
|
||||||
loader,
|
}
|
||||||
|
return Object.assign({
|
||||||
options: {
|
options: {
|
||||||
sourceMap: this.options.build.cssSourceMap
|
sourceMap: this.options.build.cssSourceMap
|
||||||
}
|
}
|
||||||
}
|
}, loader)
|
||||||
}
|
|
||||||
return loader
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// https://github.com/postcss/postcss-loader
|
// https://github.com/postcss/postcss-loader
|
||||||
|
@ -14,7 +14,7 @@ export default function vueLoader () {
|
|||||||
'css': this.styleLoader('css', [], true),
|
'css': this.styleLoader('css', [], true),
|
||||||
'less': this.styleLoader('less', 'less-loader', true),
|
'less': this.styleLoader('less', 'less-loader', true),
|
||||||
'scss': this.styleLoader('scss', 'sass-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),
|
'stylus': this.styleLoader('stylus', 'stylus-loader', true),
|
||||||
'styl': this.styleLoader('stylus', 'stylus-loader', true)
|
'styl': this.styleLoader('stylus', 'stylus-loader', true)
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user