dfklfg/packages/app/vite.config.ts

32 lines
661 B
TypeScript
Raw Normal View History

2023-11-17 11:52:10 +00:00
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
2023-11-20 12:22:52 +00:00
import { VitePWA } from 'vite-plugin-pwa';
2023-11-17 11:52:10 +00:00
import appConfig from "config";
export default defineConfig({
2023-11-20 12:22:52 +00:00
plugins: [
react(),
VitePWA({
strategies: 'injectManifest',
srcDir: 'src',
filename: 'service-worker.ts',
devOptions: {
enabled: true,
type: 'module',
}
})
],
2023-11-17 11:52:10 +00:00
assetsInclude: ['**/*.md'],
resolve: {
alias: {
'@': '/src',
},
},
define: {
CONFIG: JSON.stringify(appConfig),
global: {}, // needed for custom-event lib
SINGLE_RELAY: JSON.stringify(process.env.SINGLE_RELAY),
},
});