Tree-shake Vuestic and chunking performance
This commit is contained in:
+12
-1
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user