32 lines
		
	
	
		
			712 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			712 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import { defineConfig } from 'vite'
 | 
						|
import react from '@vitejs/plugin-react'
 | 
						|
import path from 'node:path'
 | 
						|
 | 
						|
// https://vite.dev/config/
 | 
						|
export default defineConfig({
 | 
						|
  plugins: [react()],
 | 
						|
  resolve: {
 | 
						|
    alias: {
 | 
						|
      '@': path.resolve(__dirname, './src'),
 | 
						|
    },
 | 
						|
  },
 | 
						|
  build: {
 | 
						|
    rollupOptions: {
 | 
						|
      output: {
 | 
						|
        manualChunks: {
 | 
						|
          react: ['react', 'react-dom', 'react-router', 'react-router-dom'],
 | 
						|
          framer: ['framer-motion'],
 | 
						|
          motion: ['motion/react'],
 | 
						|
          antd: [
 | 
						|
            'antd',
 | 
						|
            'rc-field-form',
 | 
						|
            'rc-motion',
 | 
						|
            '@ant-design/cssinjs',
 | 
						|
            '@rc-component/async-validator',
 | 
						|
          ],
 | 
						|
        },
 | 
						|
      },
 | 
						|
    },
 | 
						|
  },
 | 
						|
})
 |