mirror of
https://github.com/danilo-znamerovszkij/c-atlas.git
synced 2025-12-23 22:17:53 -05:00
40 lines
775 B
TypeScript
40 lines
775 B
TypeScript
import { defineConfig } from 'vite'
|
|
import tsconfigPaths from 'vite-tsconfig-paths'
|
|
import injectHTML from 'vite-plugin-html-inject'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
tsconfigPaths(),
|
|
injectHTML()
|
|
],
|
|
server: {
|
|
port: 8080,
|
|
open: true
|
|
},
|
|
build: {
|
|
target: 'es2020',
|
|
minify: 'esbuild',
|
|
sourcemap: false,
|
|
rollupOptions: {
|
|
input: {
|
|
main: './index.html',
|
|
paper: './paper.html'
|
|
},
|
|
output: {
|
|
manualChunks: {
|
|
echarts: ['echarts']
|
|
}
|
|
}
|
|
},
|
|
chunkSizeWarningLimit: 1000,
|
|
outDir: 'dist',
|
|
emptyOutDir: true
|
|
},
|
|
optimizeDeps: {
|
|
include: ['echarts']
|
|
},
|
|
define: {
|
|
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production')
|
|
}
|
|
})
|