practice_code/web/czr/vite.config.ts

40 lines
921 B
TypeScript
Raw Permalink Normal View History

2024-12-10 10:28:04 +08:00
import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig({
plugins: [
remix({
future: {
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
v3_singleFetch: true,
}
}),
tsconfigPaths(),
],
build: {
outDir: 'dist',
assetsDir: 'assets',
chunkSizeWarningLimit: 1000,
rollupOptions: {
output: {
manualChunks: {
vendor: [
'react',
'react-dom',
'three',
'gsap'
],
ui: ['@radix-ui/themes', '@radix-ui/react-icons'],
},
assetFileNames: 'assets/[name]-[hash][extname]',
chunkFileNames: 'assets/[name]-[hash].js',
entryFileNames: 'assets/[name]-[hash].js'
}
}
},
base: '',
})