39 lines
887 B
TypeScript
39 lines
887 B
TypeScript
import { fileURLToPath, URL } from "node:url";
|
|
import { defineConfig } from "vite";
|
|
import vue from "@vitejs/plugin-vue";
|
|
import vueJsx from "@vitejs/plugin-vue-jsx";
|
|
import legacy from "@vitejs/plugin-legacy";
|
|
import VueSetupExtend from "vite-plugin-vue-setup-extend";
|
|
import proxyConfig from "./proxy.config";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
base: "./",
|
|
envDir: "./env",
|
|
plugins: [
|
|
vue(),
|
|
vueJsx(),
|
|
VueSetupExtend(),
|
|
|
|
legacy({
|
|
// targets: ["defaults", "not IE 11"],
|
|
targets: {
|
|
"chrome": "120"
|
|
},
|
|
additionalLegacyPolyfills: ["regenerator-runtime/runtime"],
|
|
renderLegacyChunks: true,
|
|
polyfills: [
|
|
"es.array.to-reversed"
|
|
]
|
|
})
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"@": fileURLToPath(new URL("./src", import.meta.url))
|
|
}
|
|
},
|
|
server: {
|
|
proxy: proxyConfig
|
|
}
|
|
});
|