Files
helix-engage-server/packages/widget-src/vite.config.ts
saridsa2 99954c1ff2 fix: widget build outputs to ./dist instead of sidecar public/
Prevents accidental overwrites of the working widget.js. Use
'npm run deploy' to explicitly build + copy to sidecar public/.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 14:26:03 +05:30

23 lines
523 B
TypeScript

import { defineConfig } from 'vite';
import preact from '@preact/preset-vite';
export default defineConfig({
plugins: [preact()],
build: {
lib: {
entry: 'src/main.tsx',
name: 'HelixWidget',
fileName: () => 'widget.js',
formats: ['iife'],
},
outDir: './dist',
emptyOutDir: false,
minify: 'esbuild',
rollupOptions: {
output: {
inlineDynamicImports: true,
},
},
},
});