File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -34,9 +34,15 @@ module.exports = function (moduleOptions) {
34
34
35
35
// Customize sass-loader options
36
36
Object . assign ( this . options . build . loaders . scss , sassLoaderOptions )
37
- sassLoaderOptions . data = options . customVariables . map ( path => `@import '${ path } '` ) . join ( '\n' )
38
37
Object . assign ( this . options . build . loaders . sass , sassLoaderOptions )
39
38
39
+ // Custom variables
40
+ const sassLoaderData = this . options . build . loaders . sass . data
41
+ if ( options . customVariables . length > 0 && typeof sassLoaderData !== 'function' ) {
42
+ const imports = options . customVariables . map ( path => `@import '${ path } '` ) . join ( '\n' )
43
+ this . options . build . loaders . sass . data = sassLoaderData ? sassLoaderData . concat ( '\n' , imports ) : imports
44
+ }
45
+
40
46
// Add styles
41
47
if ( options . treeShake ) {
42
48
this . options . css . push ( 'vuetify/src/styles/main.sass' )
You can’t perform that action at this time.
0 commit comments