mirror of https://github.com/djteang/OrangeTV.git
34 lines
772 B
TypeScript
34 lines
772 B
TypeScript
import path from 'node:path';
|
|
|
|
import babel from '@rolldown/plugin-babel';
|
|
import react, { reactCompilerPreset } from '@vitejs/plugin-react';
|
|
import { defineConfig } from 'vite';
|
|
import { VitePWA } from 'vite-plugin-pwa';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
babel({
|
|
presets: [reactCompilerPreset()],
|
|
}),
|
|
VitePWA({
|
|
registerType: 'autoUpdate',
|
|
manifest: false,
|
|
workbox: {
|
|
globPatterns: ['**/*.{js,css,html,ico,png,svg,webmanifest}'],
|
|
maximumFileSizeToCacheInBytes: 8 * 1024 * 1024,
|
|
},
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, 'src'),
|
|
'~': path.resolve(__dirname, 'public'),
|
|
},
|
|
},
|
|
build: {
|
|
outDir: 'dist/client',
|
|
emptyOutDir: true,
|
|
},
|
|
});
|