Gathering detailed insights and metrics for @paro-paro/vite-plugin-vuetify-sass
Gathering detailed insights and metrics for @paro-paro/vite-plugin-vuetify-sass
Gathering detailed insights and metrics for @paro-paro/vite-plugin-vuetify-sass
Gathering detailed insights and metrics for @paro-paro/vite-plugin-vuetify-sass
npm install @paro-paro/vite-plugin-vuetify-sass
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
8 Stars
43 Commits
1 Forks
2 Watching
1 Branches
1 Contributors
Updated on 26 Aug 2024
TypeScript (85.03%)
HTML (5.15%)
Vue (3.78%)
SCSS (3.74%)
JavaScript (2.3%)
Cumulative downloads
Total Downloads
Last day
-30.4%
94
Compared to previous day
Last week
-24.5%
469
Compared to previous week
Last month
-40.7%
1,810
Compared to previous month
Last year
0%
32,400
Compared to previous year
1
Copy of vite-plugin-vuetify 's internal style plugin with a few tweaks.
Meant to be used in Nuxt
applications with SSR
enabled.
For more detailed info, check the vuetify documentation, specially the SASS and treeshaking sections.
You can also check this issue for context.
Be noted that, if you are not using Nuxt, it is recommended that you use the original
vite-plugin-vuetify
Use your favorite package manager.
1pnpm add -D @paro-paro/vite-plugin-vuetify-sass
Vuetify v3.0.0 (or above) and Vite v3.1 (or above) are required. Vite 5.x is also supported.
settings.scss
1@use 'vuetify/settings' with ( 2 $reset: false, 3 $utilities: false, 4 $button-height: 100px, 5 $button-border-radius: 50px 6);
vite.config.ts
1import { defineConfig } from 'vite' 2import vue from '@vitejs/plugin-vue' 3import vuetify from 'vite-plugin-vuetify' 4import vuetifySass from '@paro-paro/vite-plugin-vuetify-sass' 5 6export default defineConfig({ 7 plugins: [ 8 vue(), 9 vuetify({ autoImport: true }), // do not pass the 'styles' option 10 vuetifySass({ configFile: 'src/assets/settings.scss' }), 11 ], 12})
nuxt.config.ts
1import vuetify from 'vite-plugin-vuetify'
2import vuetifySass from '@paro-paro/vite-plugin-vuetify-sass'
3
4export default defineNuxtConfig({
5 ssr: true,
6 build: {
7 transpile: ['vuetify'], // when ssr is enabled
8 },
9 experimental: {
10 inlineSSRStyles: false, // for production build
11 },
12 hooks: {
13 'vite:extendConfig': (config) => {
14 config.plugins!.push(
15 vuetify({ autoImport: true }), // do not pass the 'styles' option
16 vuetifySass({
17 configFile: 'assets/settings.scss',
18 }),
19 )
20 },
21 },
22})
This plugin does not include any auto-import or treeshaking functionality. For that, you still need to use the original vite-plugin-vuetify
(as shown in the usage section). Just make sure that you do not pass the styles
option to the plugin. This way, only the internal import plugin (for treeshaking) will be used.
Currently, there are several open issues and discussions around the slow performance of SASS compilation with Vite. Despite this, I have not experienced a significant performance hit when using this plugin in a Vite + Vue + Vuetify application.
The big performance hit seems to be a Nuxt specific issue where compilation of large amount of SASS files heavily affects the warm up (dev server) time.
Update: Latest Nuxt 3.8.1 and 3.8.2 versions seem to have addressed this issue and the warm up time has being reduced significantly. Check #1 for details.
MIT License © 2023-PRESENT Antonio Parody
No vulnerabilities found.
No security vulnerabilities found.