33 lines
799 B
JavaScript
33 lines
799 B
JavaScript
import react from '@vitejs/plugin-react'
|
|
import { defineConfig } from 'vite'
|
|
import eslintPlugin from 'vite-plugin-eslint'
|
|
import svgr from 'vite-plugin-svgr'
|
|
import svgo from 'vite-plugin-svgo'
|
|
|
|
export default defineConfig({
|
|
base: './',
|
|
plugins: [react(), svgo(), svgr(), eslintPlugin()],
|
|
build: {
|
|
outDir: 'build',
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
antd: ['antd'],
|
|
codemirror: [
|
|
'@codemirror/lang-javascript',
|
|
'@codemirror/lang-python' /* etc */
|
|
],
|
|
three: ['three', 'gcode-preview'],
|
|
'react-vendor': ['react', 'react-dom', 'react-router-dom']
|
|
}
|
|
}
|
|
}
|
|
},
|
|
server: {
|
|
allowedHosts: ['dev.tombutcher.work'],
|
|
host: '0.0.0.0',
|
|
port: 5780,
|
|
open: false
|
|
}
|
|
})
|