fostr/vite.config.ts

33 lines
654 B
TypeScript
Raw Permalink Normal View History

2024-11-13 04:55:50 +00:00
import { defineConfig } from 'vite';
import { VitePWA } from 'vite-plugin-pwa';
// https://vitejs.dev/config/
export default defineConfig({
base: "/",
build: {
sourcemap: true,
assetsDir: "code",
target: ["esnext"],
cssMinify: true,
lib: false
},
plugins: [
VitePWA({
strategies: "injectManifest",
injectManifest: {
swSrc: 'public/sw.js',
swDest: 'dist/sw.js',
globDirectory: 'dist',
globPatterns: [
'**/*.{html,js,css,json,png}',
],
},
injectRegister: false,
manifest: false,
devOptions: {
enabled: true
}
})
]
})