23 lines
576 B
TypeScript
23 lines
576 B
TypeScript
import path from "path";
|
|
import react from "@vitejs/plugin-react-swc";
|
|
import { defineConfig } from "vite";
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
"react-vendor": ["react", "react-dom", "react-router-dom"], // Вынос библиотеки React
|
|
"ui-library": ["@/components/shared"], // Отдельный чанк для UI-компонентов
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|