Browse Source

vite config

Benjamin Kornblum 8 months ago
parent
commit
8d1409f5e8
2 changed files with 9 additions and 1 deletions
  1. 1 1
      src/main.ts
  2. 8 0
      vite.config.ts

+ 1 - 1
src/main.ts

@@ -13,7 +13,7 @@ const app = createApp(App)
 app.use(pinia)
    .use(i18n)
 
-loadDynamicPages(localStorage.getItem('lang') || 'de')
+await loadDynamicPages(localStorage.getItem('lang') || 'de')
 app.use(router)
    
 app.mount('#app')

+ 8 - 0
vite.config.ts

@@ -6,6 +6,14 @@ import vueDevTools from 'vite-plugin-vue-devtools'
 
 // https://vite.dev/config/
 export default defineConfig({
+  optimizeDeps: {
+    esbuildOptions: {
+      target: 'esnext'
+    }
+  },
+  build: {
+    target: 'esnext'
+  },
   plugins: [
     vue(),
     vueDevTools(),