2021-11-18 01:32:04 +00:00
|
|
|
import { defineConfig } from 'vite'
|
|
|
|
import tsconfigPaths from "vite-tsconfig-paths";
|
|
|
|
import viteCompression from 'vite-plugin-compression';
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
2021-11-19 02:30:21 +00:00
|
|
|
base: "",
|
2021-11-18 01:32:04 +00:00
|
|
|
build: {
|
|
|
|
outDir: 'build',
|
|
|
|
},
|
|
|
|
optimizeDeps: {
|
|
|
|
entries: "src/index.tsx"
|
|
|
|
},
|
|
|
|
server: {
|
|
|
|
cors: false
|
|
|
|
},
|
|
|
|
publicDir: 'public',
|
|
|
|
assetsInclude: ['**/*.md'],
|
2021-11-19 02:30:21 +00:00
|
|
|
plugins: [tsconfigPaths(),
|
|
|
|
viteCompression({
|
|
|
|
algorithm: 'gzip',
|
|
|
|
disable: false,
|
|
|
|
deleteOriginFile: true,
|
|
|
|
filter: /\.(js|json|css|svg|md)$/i
|
|
|
|
})
|
2021-11-18 08:38:19 +00:00
|
|
|
],
|
2021-11-18 01:32:04 +00:00
|
|
|
})
|