Unable to access Vuetify Sass module configuration
See original GitHub issue(as discussed Kael on Discord)
https://github.com/glen-84/vuetify-loader-issue
If you try to forward the configured Vuetify Sass module with something like:
main.scss
@forward "vuetify/styles" with
(
$body-font-family: "monospace"
);
app.vue
<style lang="scss" scoped>
@use "./main" as x;
a {
font-family: x.$body-font-family;
}
</style>
You see two different types of errors:
modulesTypeError: options.awaitResolve is not a function
SassError: This variable was not declared with !default in the @used module.
@KaelWD What is the best way forward here? (excuse the pun)
If this is not possible, should developers manually import the Sass files?
Issue Analytics
- State:
- Created 2 years ago
- Comments:27 (8 by maintainers)
Top Results From Across the Web
SASS variables
The Nuxt Vuetify module exposes a vuetify property where you can configure the module. Ensure that you enable the treeShake option first. This ......
Read more >Unable to override Vuetify 2.1 SASS variables
Set all top-level variables before importing Vuetify, so that Vuetify doesn't overwrite. set these variables before Vuetify does
Read more >Working with CSS
Vue CLI projects come with support for PostCSS, CSS Modules and pre-processors including Sass, Less and Stylus.
Read more >How to Import a Sass File into Every Vue Component in an ...
Now, let's create a file called vue.config.js at the root of the ... module.exports = { css: { loaderOptions: { sass: { data:...
Read more >Use CSS in Gridsome
You can also use SASS in Vue Components with the lang="scss" attribute: ... to the top of your gridsome.config.js file before the existing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is now officially supported and I’ve updated the documentation: https://next.vuetifyjs.com/en/features/sass-variables/
This seems to work for me:
Or if having it split between general and component variables is too confusing:
If you use pnpm or yarn plug-n-play though you might have to switch to something else, there must be a bug in sass or something because the symlinked files don’t have the variables defined.