-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.debug.ts
More file actions
43 lines (41 loc) · 1.04 KB
/
vite.config.debug.ts
File metadata and controls
43 lines (41 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/**
* Vite Configuration for Debug Panel Build
*
* Builds a separate debug.js file that can be loaded alongside the widget.
* Does not minify or drop console logs for easier debugging.
*
* Usage:
* npm run build:debug
*
* Output:
* dist/debug.js
*/
import tailwindcss from '@tailwindcss/vite';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [react(), tailwindcss()],
root: '.',
publicDir: false,
build: {
outDir: 'dist',
emptyOutDir: false, // Don't clear dist folder (keep index.mjs)
codeSplitting: false,
cssCodeSplit: false,
chunkSizeWarningLimit: 600,
assetsInlineLimit: 100000000,
rollupOptions: {
input: 'src/debug.tsx',
output: {
entryFileNames: 'debug.js',
chunkFileNames: 'debug-[name].js',
assetFileNames: 'debug.[ext]',
format: 'iife',
manualChunks: undefined,
},
},
// Don't minify for debug build - easier to debug
minify: false,
sourcemap: true,
},
});