Skip to content

Commit 8399e86

Browse files
authored
Merge pull request #2421 from rommapp/vite-optimize-deps
Pre-optimize vuetify deps in development mode
2 parents bb141e0 + e0f83f8 commit 8399e86

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

frontend/vite.config.js

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,55 @@ import mkcert from "vite-plugin-mkcert";
66
import { VitePWA } from "vite-plugin-pwa";
77
import vuetify, { transformAssetUrls } from "vite-plugin-vuetify";
88

9+
// Vuetify components to preoptimize for faster dev startup
10+
const VUETIFY_COMPONENTS = [
11+
"vuetify/components/transitions",
12+
"vuetify/components/VAlert",
13+
"vuetify/components/VAppBar",
14+
"vuetify/components/VAutocomplete",
15+
"vuetify/components/VAvatar",
16+
"vuetify/components/VBottomNavigation",
17+
"vuetify/components/VBtn",
18+
"vuetify/components/VBtnGroup",
19+
"vuetify/components/VBtnToggle",
20+
"vuetify/components/VCard",
21+
"vuetify/components/VCarousel",
22+
"vuetify/components/VCheckbox",
23+
"vuetify/components/VChip",
24+
"vuetify/components/VDataTable",
25+
"vuetify/components/VDialog",
26+
"vuetify/components/VDivider",
27+
"vuetify/components/VEmptyState",
28+
"vuetify/components/VExpansionPanel",
29+
"vuetify/components/VFileInput",
30+
"vuetify/components/VForm",
31+
"vuetify/components/VGrid",
32+
"vuetify/components/VHover",
33+
"vuetify/components/VIcon",
34+
"vuetify/components/VImg",
35+
"vuetify/components/VItemGroup",
36+
"vuetify/components/VLabel",
37+
"vuetify/components/VList",
38+
"vuetify/components/VMenu",
39+
"vuetify/components/VNavigationDrawer",
40+
"vuetify/components/VProgressCircular",
41+
"vuetify/components/VProgressLinear",
42+
"vuetify/components/VRating",
43+
"vuetify/components/VSelect",
44+
"vuetify/components/VSheet",
45+
"vuetify/components/VSkeletonLoader",
46+
"vuetify/components/VSlider",
47+
"vuetify/components/VSnackbar",
48+
"vuetify/components/VSpeedDial",
49+
"vuetify/components/VSwitch",
50+
"vuetify/components/VTabs",
51+
"vuetify/components/VTextarea",
52+
"vuetify/components/VTextField",
53+
"vuetify/components/VToolbar",
54+
"vuetify/components/VTooltip",
55+
"vuetify/components/VWindow",
56+
];
57+
958
// https://vitejs.dev/config/
1059
export default defineConfig(({ mode }) => {
1160
// Load ENV variables from the parent directory and the current directory.
@@ -18,6 +67,9 @@ export default defineConfig(({ mode }) => {
1867
const backendPort = env.DEV_PORT ?? "5000";
1968

2069
return {
70+
optimizeDeps: {
71+
include: VUETIFY_COMPONENTS,
72+
},
2173
build: {
2274
target: "esnext",
2375
},

0 commit comments

Comments
 (0)