mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-05-20 20:48:26 -05:00
fix: fix sassOptions merging for scss syntax in sass-loader v8 (#4631)
fixes #4630
This commit is contained in:
@@ -307,7 +307,10 @@ test('css.loaderOptions', () => {
|
||||
css: {
|
||||
loaderOptions: {
|
||||
sass: {
|
||||
prependData
|
||||
prependData,
|
||||
sassOptions: {
|
||||
includePaths: ['./src/styles']
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -316,12 +319,17 @@ test('css.loaderOptions', () => {
|
||||
|
||||
expect(findOptions(config, 'scss', 'sass')).toMatchObject({
|
||||
prependData,
|
||||
sourceMap: false
|
||||
sourceMap: false,
|
||||
sassOptions: {
|
||||
includePaths: ['./src/styles']
|
||||
}
|
||||
})
|
||||
expect(findOptions(config, 'scss', 'sass').sassOptions).not.toHaveProperty('indentedSyntax')
|
||||
expect(findOptions(config, 'sass', 'sass')).toMatchObject({
|
||||
prependData,
|
||||
sassOptions: {
|
||||
indentedSyntax: true
|
||||
indentedSyntax: true,
|
||||
includePaths: ['./src/styles']
|
||||
},
|
||||
sourceMap: false
|
||||
})
|
||||
|
||||
@@ -204,7 +204,8 @@ module.exports = (api, rootOptions) => {
|
||||
loaderOptions.sass,
|
||||
{
|
||||
sassOptions: Object.assign(
|
||||
(loaderOptions.sass && loaderOptions.sass.sassOptions) || {},
|
||||
{},
|
||||
loaderOptions.sass && loaderOptions.sass.sassOptions,
|
||||
{
|
||||
indentedSyntax: true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user