Files
MangaStatus/vite.config.ts
wea_ondara 7f28012520 added mangaupdates integration
cleanup db related code
cleanup ui
ui eye candy
2023-09-26 17:56:32 +02:00

39 lines
873 B
TypeScript

import {fileURLToPath, URL} from 'node:url';
import {defineConfig} from 'vite';
import vue from '@vitejs/plugin-vue';
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(), VueI18nPlugin({compositionOnly: false}),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
build: {
manifest: true,
emptyOutDir: false,
rollupOptions: {
input: './src/main.ts',
},
},
clearScreen: false,
server: {
proxy: {
'/graphql': {
target: 'https://graphql.anilist.co',
changeOrigin: true,
},
'^/mangaupdates/.*$': {
target: 'https://api.mangaupdates.com',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/mangaupdates/, ''),
},
},
},
});