0

So I successfully configure webpack for loading scss style that is in my components. I use a <style lang="scss"></style> and it goes well.
I used the vue-cli with the webpack installation.
But I would need to call some of my scss variables from there, so I guess I would need a kind of preload?

Is there a way to do it without having to @import in each component?

1 Answer 1

1

You need sass-resources-loader.
The solution is provided in vue-loader's official document. Please check the section named Loading a global settings file.

PS: Actually, it's been discussed as an issue for quite a while. You can check the discussion here.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.