frontend/vite.config.ts (55 lines of code) (raw):

/******************************************************************************** * Copyright (c) 2023, 2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0 * * SPDX-License-Identifier: EPL-2.0 ********************************************************************************/ import {fileURLToPath, URL} from 'node:url' import {defineConfig} from 'vite' import vue from '@vitejs/plugin-vue' import vueJsx from '@vitejs/plugin-vue-jsx' import AutoImport from 'unplugin-auto-import/vite' import Components from 'unplugin-vue-components/vite' import {ElementPlusResolver} from 'unplugin-vue-components/resolvers' export default defineConfig({ plugins: [ vue({ template: { compilerOptions: { isCustomElement: (tag) => ['flame-graph'].includes(tag), } } }), vueJsx(), AutoImport({ imports: [ 'vue' ], resolvers: [ElementPlusResolver()], }), Components({ resolvers: [ElementPlusResolver()], dirs: [] }), ], resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) } }, server: { port: 8089, proxy: { '/jifa-api': { target: 'http://localhost:8102', }, '/oauth2': { target: 'http://localhost:8102', }, '/login': { target: 'http://localhost:8102', }, '/jifa-stomp': { target: 'ws://localhost:8102', ws: true } } }, build: { chunkSizeWarningLimit: 10240 } })