79 lines
1.8 KiB
JavaScript
79 lines
1.8 KiB
JavaScript
import { defineConfig, splitVendorChunkPlugin } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
|
|
const manifest = {
|
|
registerType: 'prompt',
|
|
includeAssets: ['assets/icon.png'],
|
|
manifest: {
|
|
name: 'NQuest',
|
|
short_name: 'NQuest',
|
|
description: 'NQuest - платформа для ARG игр.',
|
|
icons: [
|
|
{
|
|
src: 'assets/icons/icon-72x72.png',
|
|
sizes: '72x72',
|
|
type: 'image/png'
|
|
},
|
|
{
|
|
src: 'assets/icons/icon-96x96.png',
|
|
sizes: '96x96',
|
|
type: 'image/png'
|
|
},
|
|
{
|
|
src: 'assets/icons/icon-128x128.png',
|
|
sizes: '128x128',
|
|
type: 'image/png'
|
|
},
|
|
{
|
|
src: 'assets/icons/icon-144x144.png',
|
|
sizes: '144x144',
|
|
type: 'image/png'
|
|
},
|
|
{
|
|
src: 'assets/icons/icon-152x152.png',
|
|
sizes: '152x152',
|
|
type: 'image/png'
|
|
},
|
|
{
|
|
src: 'assets/icons/icon-192x192.png',
|
|
sizes: '192x192',
|
|
type: 'image/png'
|
|
},
|
|
{
|
|
src: 'assets/icons/icon-384x384.png',
|
|
sizes: '384x384',
|
|
type: 'image/png'
|
|
},
|
|
{
|
|
src: 'assets/icons/icon-512x512.png',
|
|
sizes: '512x512',
|
|
type: 'image/png'
|
|
}
|
|
],
|
|
theme_color: '#fb923c',
|
|
background_color: '#171e26',
|
|
display: 'minimal-ui',
|
|
scope: '/',
|
|
start_url: '/'
|
|
}
|
|
}
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react(), splitVendorChunkPlugin()/* , VitePWA(manifest) */],
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
ws: false
|
|
}
|
|
}
|
|
},
|
|
build: {
|
|
// generate .vite/manifest.json in outDir
|
|
manifest: true
|
|
}
|
|
})
|