cleanup conf

This commit is contained in:
2023-09-16 20:29:01 +02:00
parent 76131aac07
commit e499c5aee2

View File

@@ -1,42 +1,38 @@
import vue from '@vitejs/plugin-vue'; import vue from '@vitejs/plugin-vue';
import * as path from "path"; import * as path from "path";
import { defineConfig, loadEnv } from 'vite'; import { defineConfig } from 'vite';
export default defineConfig(({ mode }) => { export default defineConfig({
const env = loadEnv(mode, process.cwd(), ''); plugins: [vue()],
resolve: {
return { alias: {
plugins: [vue()], 'src': path.resolve(__dirname, './src/'),
resolve: { '@': path.resolve(__dirname, './src/'),
alias: {
'src': path.resolve(__dirname, './src/'),
'@': path.resolve(__dirname, './src/'),
},
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
}, },
server: { extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
port: 3000, },
strictPort: true, server: {
proxy: { port: 3000,
'/api/': { strictPort: true,
target: 'https://api.eveal.shendai.rip/', proxy: {
changeOrigin: true, '/api/': {
followRedirects: true, target: 'https://api.eveal.shendai.rip/',
rewrite: (path) => path.replace(/^\/api/, ''), changeOrigin: true,
}, followRedirects: true,
'/appraisal/': { rewrite: (path) => path.replace(/^\/api/, ''),
target: 'https://appraise.imperium.nexus/', },
changeOrigin: true, '/appraisal/': {
followRedirects: true, target: 'https://appraise.imperium.nexus/',
rewrite: (path) => path.replace(/^\/appraisal/, ''), changeOrigin: true,
}, followRedirects: true,
'/esi/': { rewrite: (path) => path.replace(/^\/appraisal/, ''),
target: 'https://esi.evetech.net/latest/', },
changeOrigin: true, '/esi/': {
followRedirects: true, target: 'https://esi.evetech.net/latest/',
rewrite: (path) => path.replace(/^\/esi/, ''), changeOrigin: true,
} followRedirects: true,
rewrite: (path) => path.replace(/^\/esi/, ''),
} }
} }
}; }
}) })