1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- import { fileURLToPath, URL } from "node:url";
- import { defineConfig } from "vite";
- import legacy from "@vitejs/plugin-legacy";
- import vue2 from "@vitejs/plugin-vue2";
- import vue2Jsx from "@vitejs/plugin-vue2-jsx";
- import cesium from 'vite-plugin-cesium';
- export default defineConfig({
- plugins: [
- vue2(),
- vue2Jsx(),
- cesium(),
- legacy({
- targets: ['IE 11'],
- additionalLegacyPolyfills: ["regenerator-runtime/runtime"],
- }),
- ],
- resolve: {
- alias: {
- "@": fileURLToPath(new URL("./src", import.meta.url)),
- },
- },
- server: {
-
- https: false,
-
-
-
- host: "0.0.0.0",
-
- open: true,
-
- cors: true,
-
- proxy: {
- "/camera-api": {
- target: "https://ycjk.cq119.gov.cn",
- changeOrigin: true,
- rewrite: (path) => path.replace(/^\/camera-api/, ""),
- }
- },
- },
- build: {
-
- sourcemap: false,
-
- chunkSizeWarningLimit: 2000,
-
- reportCompressedSize: false,
- },
- });
|