36 lines
800 B
JavaScript
36 lines
800 B
JavaScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import path from "path";
|
|
import { fileURLToPath } from "url";
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
chunkSizeWarningLimit: 3500,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks(id) {
|
|
if (id.includes("node_modules")) {
|
|
if (id.includes("three")) {
|
|
return "three";
|
|
}
|
|
if (id.includes("gsap")) {
|
|
return "gsap";
|
|
}
|
|
return "vendor";
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
plugins: [react()],
|
|
assetsInclude: ["**/*.glb"],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
});
|