![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
vite-plugin-vuetify
Advanced tools
vite-plugin-vuetify is a Vite plugin that provides seamless integration with Vuetify, a popular Vue.js UI library. It simplifies the process of setting up Vuetify in a Vite project, offering features like automatic component registration, theme customization, and more.
Automatic Component Registration
This feature allows you to automatically register Vuetify components in your Vite project, eliminating the need for manual imports.
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import vuetify from 'vite-plugin-vuetify';
export default defineConfig({
plugins: [vue(), vuetify()]
});
Custom Theme Configuration
This feature allows you to customize the Vuetify theme directly within your Vite configuration file, making it easy to apply consistent styling across your application.
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import vuetify from 'vite-plugin-vuetify';
export default defineConfig({
plugins: [vue(), vuetify({
theme: {
themes: {
light: {
primary: '#1976D2',
secondary: '#424242',
accent: '#82B1FF',
error: '#FF5252',
info: '#2196F3',
success: '#4CAF50',
warning: '#FFC107'
}
}
}
})]
});
Tree Shaking
Enabling tree shaking helps reduce the bundle size by including only the Vuetify components and styles that are actually used in your project.
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import vuetify from 'vite-plugin-vuetify';
export default defineConfig({
plugins: [vue(), vuetify({
treeShake: true
})]
});
vuetify-loader is a webpack loader that automatically imports Vuetify components as you use them. It offers similar functionality to vite-plugin-vuetify but is designed for use with webpack instead of Vite.
vite-plugin-vue2 is a Vite plugin that provides support for Vue 2 projects. While it doesn't specifically target Vuetify, it can be used in conjunction with Vuetify to set up a Vue 2 project with Vite.
vite-plugin-vue-jsx is a Vite plugin that adds support for Vue JSX. It can be used alongside Vuetify to enable JSX syntax in your Vue components, offering a different approach to writing Vue components compared to the template syntax.
// vite.config.js
plugins: [
vue(),
vuetify({ autoImport: true }), // Enabled by default
]
// plugins/vuetify.js
import 'vuetify/styles'
import { createVuetify } from 'vuetify'
export default createVuetify()
// vite.config.js
plugins: [
vue(),
vuetify({
autoImport: { labs: true }
}),
]
// vite.config.js
plugins: [
vue(),
vuetify({
autoImport: {
ignore: [
'VAlert', // Component name
'Ripple', // Directive name
]
}
}),
]
Note ignore
values are case-sensitive
// vite.config.js
plugins: [
vue(),
vuetify({ styles: { configFile: 'src/settings.scss' } }),
]
// plugins/vuetify.js
import 'vuetify/styles'
import { createVuetify } from 'vuetify'
export default createVuetify()
// settings.scss
@use 'vuetify/settings' with (
$color-pack: false,
$utilities: false,
);
settings.scss
can be used in your own components to access vuetify's variables.
// vite.config.js
plugins: [
vue(),
vuetify({ styles: 'none' }),
]
// plugins/vuetify.js
import { createVuetify } from 'vuetify'
export default createVuetify()
Vuetify 3 uses precompiled css by default, these imports can optionally be modified to point to sass files instead:
// vite.config.js
plugins: [
vue(),
vuetify({ styles: 'sass' }),
]
https://github.com/vitejs/vite-plugin-vue/blob/main/packages/plugin-vue/README.md#asset-url-handling
// vite.config.js
import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
export default {
plugins: [
vue({
template: { transformAssetUrls }
}),
vuetify(),
],
}
FAQs
A Vite plugin for treeshaking Vuetify components and more
The npm package vite-plugin-vuetify receives a total of 268,663 weekly downloads. As such, vite-plugin-vuetify popularity was classified as popular.
We found that vite-plugin-vuetify demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.