Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting custom SASS variable often fails (using vite) #273

Open
jhh-ncurity opened this issue Nov 4, 2022 · 3 comments
Open

Setting custom SASS variable often fails (using vite) #273

jhh-ncurity opened this issue Nov 4, 2022 · 3 comments

Comments

@jhh-ncurity
Copy link

After setting custom sass variable using: https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin#customising-variables

If I run npm run dev, I get this error in console:

image

But this doesn't happen everytime. Sometimes I get no errors but intial page loads slower than usual.
I wanna know if this(slow init) is normal too.

You can reproduce this error by scaffolding vuetify application with npm create vuetify, then set custom SASS variable by method linked above(offical doc).

Here is my config:

// vite.config.js

export default defineConfig({
  plugins: [
    vue(),
    // https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin
    vuetify({
      styles: { configFile: 'src/settings.scss' }
    })
  ],
//...and rest are defaults
// src/settings.scss
@use 'vuetify/settings' with (
    $font-size-root: 40px, 
);
// src/plugins/vuetify.js
import '@mdi/font/css/materialdesignicons.css'
import 'vuetify/styles'

import { createVuetify } from 'vuetify'

export default createVuetify({
  theme: {
    themes: {
      light: {
        colors: {
          primary: '#1867C0',
          secondary: '#5CBBF6',
        },
      },
    },
  },
})
@carlosmouracorreia
Copy link

Did you find a way? I'm going through the same, using Nuxt3, and not alone:

nuxt/nuxt#15412

@carlosmouracorreia
Copy link

Any news on this @jhh-ncurity ? The steps to reproduce it are on the Nuxt Issue above @KaelWD

@nass600
Copy link

nass600 commented Oct 24, 2023

Still happening, has anyone found a fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants