Tree-shake Vuestic and chunking performance

This commit is contained in:
2024-05-26 23:17:52 +02:00
parent 4fd8628f64
commit d436838a79
7 changed files with 199 additions and 15 deletions
+12 -1
View File
@@ -1,12 +1,23 @@
import { fileURLToPath, URL } from 'node:url';
import { defineConfig } from 'vite';
import Components from 'unplugin-vue-components/vite';
import vue from '@vitejs/plugin-vue';
// https://vitejs.dev/config/
export default defineConfig({
base: process.env.BASE || '/',
plugins: [vue()],
plugins: [
vue(),
Components({
resolvers: [
(componentName) => {
if (componentName.startsWith('Va') || componentName.startsWith('va'))
return { name: componentName, from: 'vuestic-ui' };
}
]
})
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))