2022-12-24 12:18:26 +03:00
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
import react from '@vitejs/plugin-react';
|
2022-12-24 21:17:28 +03:00
|
|
|
import { VitePWA } from 'vite-plugin-pwa';
|
|
|
|
import { manifest } from './manifest';
|
2022-12-26 00:44:43 +03:00
|
|
|
import pack from './package.json';
|
2022-12-24 12:18:26 +03:00
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
2022-12-24 21:17:28 +03:00
|
|
|
plugins: [react(), VitePWA({
|
|
|
|
strategies: 'injectManifest',
|
|
|
|
srcDir: './src',
|
|
|
|
filename: 'service-worker.ts',
|
|
|
|
injectRegister: false,
|
|
|
|
manifestFilename: 'manifest.json',
|
|
|
|
manifest,
|
|
|
|
})],
|
2022-12-24 12:18:26 +03:00
|
|
|
build: {
|
|
|
|
outDir: 'build',
|
|
|
|
},
|
|
|
|
server: {
|
|
|
|
port: 3000,
|
|
|
|
},
|
2022-12-26 00:44:43 +03:00
|
|
|
base: pack.homepage ?? '/',
|
2022-12-24 12:18:26 +03:00
|
|
|
});
|