-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
39 lines (38 loc) · 859 Bytes
/
Copy pathvite.config.js
File metadata and controls
39 lines (38 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import tailwindcss from "@tailwindcss/vite";
import Components from "unplugin-vue-components/vite";
export default defineConfig({
plugins: [
vue(),
tailwindcss(),
Components({
dts: true,
}),
],
resolve: {
alias: {
"@": new URL("./src", import.meta.url).pathname,
},
},
build: {
// Optimizaciones para producción
minify: "esbuild",
esbuildOptions: {
drop: ["console", "debugger"],
},
// Crear chunks para mejor performance
rollupOptions: {
output: {
manualChunks: {
vue: ["vue", "vue-router"],
vendor: ["motion"],
},
},
},
// Generar source maps para depuración en producción
sourcemap: true,
},
// Base URL para despliegue
base: "/",
});