feat: refactor
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import react from "@vitejs/plugin-react-swc";
|
||||
import million from "million/compiler";
|
||||
import { defineConfig } from "vite";
|
||||
import topLevelAwait from "vite-plugin-top-level-await";
|
||||
import viteTsconfigPaths from "vite-tsconfig-paths";
|
||||
|
||||
export default defineConfig({
|
||||
@@ -13,6 +14,12 @@ export default defineConfig({
|
||||
}),
|
||||
react(),
|
||||
viteTsconfigPaths(),
|
||||
topLevelAwait({
|
||||
// The export name of top-level await promise for each chunk module
|
||||
promiseExportName: "__tla",
|
||||
// The function to generate import names of top-level await promise in each chunk module
|
||||
promiseImportName: (i) => `__tla_${i}`,
|
||||
}),
|
||||
],
|
||||
envPrefix: ["VITE_", "TAURI_"],
|
||||
build: {
|
||||
|
||||
Reference in New Issue
Block a user