30 lines
661 B
TypeScript
30 lines
661 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react-swc';
|
|
import checker from 'vite-plugin-checker';
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react(), checker({ typescript: true })],
|
|
base: '/',
|
|
server: {
|
|
host: true,
|
|
port: 3000,
|
|
watch: {
|
|
usePolling: true,
|
|
},
|
|
},
|
|
build: {
|
|
sourcemap: true,
|
|
outDir: 'dist',
|
|
assetsDir: 'assets',
|
|
manifest: true,
|
|
rollupOptions: {
|
|
output: {
|
|
entryFileNames: 'assets/[name].[hash].js',
|
|
chunkFileNames: 'assets/[name].[hash].js',
|
|
assetFileNames: 'assets/[name].[hash].[ext]',
|
|
},
|
|
},
|
|
},
|
|
});
|