nquest/frontend/vite.config.js

39 lines
885 B
JavaScript
Raw Normal View History

2024-01-21 00:50:52 +03:00
import { defineConfig, splitVendorChunkPlugin } from 'vite'
2023-11-01 23:21:12 +03:00
import react from '@vitejs/plugin-react'
2024-01-21 00:50:52 +03:00
import { VitePWA } from 'vite-plugin-pwa'
const manifest = {
registerType: 'prompt',
includeAssets: ['assets/icon.png'],
manifest: {
name: 'NQuest',
short_name: 'NQuest',
description: 'NQuest - платформа для ARG игр.',
icons: [],
theme_color: '#fb923c',
background_color: '#171e26',
display: 'standalone',
scope: '/',
start_url: '/quests'
}
}
2023-11-01 23:21:12 +03:00
// https://vitejs.dev/config/
export default defineConfig({
2024-01-21 00:50:52 +03:00
plugins: [react(), splitVendorChunkPlugin(), VitePWA(manifest)],
2023-11-01 23:21:12 +03:00
server: {
proxy: {
'/api': {
target: 'http://localhost:8000',
changeOrigin: true,
secure: false,
2024-01-21 00:50:52 +03:00
ws: false
2023-11-01 23:21:12 +03:00
}
}
2024-01-21 00:50:52 +03:00
},
build: {
// generate .vite/manifest.json in outDir
manifest: true
2023-11-01 23:21:12 +03:00
}
})