2023-02-16 03:06:44 +00:00
|
|
|
import { defineConfig } from "vite";
|
|
|
|
import react from "@vitejs/plugin-react";
|
2023-03-02 04:07:28 +00:00
|
|
|
import legacy from "@vitejs/plugin-legacy";
|
2021-11-18 01:32:04 +00:00
|
|
|
import tsconfigPaths from "vite-tsconfig-paths";
|
2023-02-16 03:06:44 +00:00
|
|
|
import viteCompression from "vite-plugin-compression";
|
2021-11-18 01:32:04 +00:00
|
|
|
|
|
|
|
// 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: {
|
2023-02-16 03:06:44 +00:00
|
|
|
outDir: "build",
|
|
|
|
reportCompressedSize: false,
|
2023-02-16 22:42:44 +00:00
|
|
|
rollupOptions: {
|
|
|
|
output: {
|
|
|
|
experimentalDeepDynamicChunkOptimization: true,
|
|
|
|
},
|
|
|
|
},
|
2021-11-18 01:32:04 +00:00
|
|
|
},
|
|
|
|
optimizeDeps: {
|
2023-02-16 03:06:44 +00:00
|
|
|
entries: "src/index.tsx",
|
2021-11-18 01:32:04 +00:00
|
|
|
},
|
|
|
|
server: {
|
2023-02-16 03:06:44 +00:00
|
|
|
port: 3000,
|
|
|
|
cors: false,
|
2021-11-18 01:32:04 +00:00
|
|
|
},
|
2023-02-16 03:06:44 +00:00
|
|
|
publicDir: "public",
|
|
|
|
assetsInclude: ["**/*.md"],
|
|
|
|
plugins: [
|
2023-03-02 04:07:28 +00:00
|
|
|
react(),
|
|
|
|
legacy(),
|
2023-02-16 03:06:44 +00:00
|
|
|
tsconfigPaths(),
|
2021-11-19 02:30:21 +00:00
|
|
|
viteCompression({
|
2023-02-16 03:06:44 +00:00
|
|
|
algorithm: "gzip",
|
|
|
|
disable: false,
|
|
|
|
deleteOriginFile: true,
|
|
|
|
filter: /\.(js|json|css|svg|md)$/i,
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
});
|