123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- import { fileURLToPath, URL } from "node:url";
- import { defineConfig } from "vite";
- import { babel } from '@rollup/plugin-babel';
- import vue2 from "@vitejs/plugin-vue2";
- import vue2Jsx from "@vitejs/plugin-vue2-jsx";
- export default defineConfig({
- plugins: [
- vue2(),
- vue2Jsx()
- ],
- 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,
- cssTarget: 'chrome70',
- target: 'es2015',
- rollupOptions: {
- plugins: [
-
- babel({
- babelHelpers: 'bundled',
- presets: [
- [
- '@babel/preset-env',
- {
- useBuiltIns: 'entry',
- corejs: '3',
- targets: 'last 2 versions and not dead, > 0.2%, Firefox ESR',
- },
- ],
- ],
- plugins: [],
- compact: false,
- })
- ]
- }
- },
- });
|