first commit
This commit is contained in:
commit
34ea15a54d
246 changed files with 18660 additions and 0 deletions
45
frontend/vite.config.js
Normal file
45
frontend/vite.config.js
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
import react from '@vitejs/plugin-react'
|
||||
import { defineConfig } from 'vite'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
if (id.includes('node_modules/three')) {
|
||||
return 'three'
|
||||
}
|
||||
if (id.includes('node_modules/gsap')) {
|
||||
return 'gsap'
|
||||
}
|
||||
if (id.includes('/webgl/hero-atmosphere/')) {
|
||||
return 'hero-atmosphere'
|
||||
}
|
||||
if (id.includes('node_modules/react-router') || id.includes('node_modules/react-dom')) {
|
||||
return 'vendor-react'
|
||||
}
|
||||
if (id.includes('node_modules/axios')) {
|
||||
return 'vendor-http'
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
test: {
|
||||
environment: 'node',
|
||||
},
|
||||
server: {
|
||||
port: 5173,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://127.0.0.1:8000',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/media': {
|
||||
target: 'http://127.0.0.1:8000',
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue