Questions regarding how to use electron or vue are likely to be closed as they are not direct issues with this boilerplate. Please seek solutions from official documentation or their respective communities.
# I am trying to use a global Sass file and access color variables from it in my components, but I always get the result of "variable not found".
# In a new project from scratch, configure a global Sass file following the official guide in this link.
#

This is my current webpack configuration.

Change this

to

This worked for me.
Had a similar issue _#752_. It was solved using @Abramwow tip. thanks
I had a similar problem, and spend about nine, NINE hours trying to debug this. Turns out, I just had to include the file extension in the webpack.renderer.config.js file.
loaders: {
sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax=1&data=@import "./src/renderer/assets/css/main.scss"',
scss: 'vue-style-loader!css-loader!sass-loader?data=@import "./src/renderer/assets/css/main.scss";'
}
I now wear a toupé.
Ah ok, this problem is solved with answer of @Abramwow. Please, close this issue.
Thanks!
This saved my day. Thanks.
@abramdev 's answer worked for me.
This should probably be updated in https://simulatedgreg.gitbooks.io/electron-vue/content/en/using_pre-processors.html because the example given doesn't work.
Wanted to follow up on this as I am also having issues following:
https://simulatedgreg.gitbooks.io/electron-vue/content/en/using_pre-processors.html
I did also try using @abramdev 's approach and that worked, however I could never get it to allow me to use standard scss formatting. It kept wanting me to use indentedSyntax no matter how hard I tried to turn it off.
If anyone has any thoughts where I might be going wrong, please let me know. New to vue-electron.
Wanted to follow up on this as I am also having issues following:
https://simulatedgreg.gitbooks.io/electron-vue/content/en/using_pre-processors.htmlI did also try using @abramdev 's approach and that worked, however I could never get it to allow me to use standard scss formatting. It kept wanting me to use indentedSyntax no matter how hard I tried to turn it off.
If anyone has any thoughts where I might be going wrong, please let me know. New to vue-electron.
Did you update the scss not the sass loader?
Thank you @abramdev
Change this
to
This worked for me.
data has been renamed to prependData in v8.
I've just spent the better part of the day resolving this, and in my case the fault lied in missing the semicolon at the end of the import.
Most helpful comment
Change this
to
This worked for me.