12345678910111213141516171819202122232425262728293031323334353637 |
- import { defineConfig } from 'vite'
- import vue from '@vitejs/plugin-vue'
- import legacy from '@vitejs/plugin-legacy'
- import path from 'path'
- // https://vitejs.dev/config/
- export default defineConfig({
- plugins: [
- vue(),
- legacy({
- targets: ['> 1%, last 1 version, ie >= 11'],
- additionalLegacyPolyfills: ['regenerator-runtime/runtime'],
- polyfills: ['es.promise.finally', 'es/map', 'es/set'],
- modernPolyfills: ['es.promise.finally']
- })
- ],
- server: {
- port: 3000,
- cors: true,
- host: '0.0.0.0',
- proxy: {
- '/v1': {
- target: 'http://8.136.199.33:8608',
- changeOrigin: true,
- rewrite: (path) => path.replace(/^\/v1/, '/v1')
- }
- },
- },
- build: {
- outDir: 'horz_chart',
- },
- resolve: {
- alias: {
- '@': path.resolve(__dirname, './src')
- },
- },
- })
|