Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ export default defineConfig({
minify: 'esbuild',
target: 'es2020',
rollupOptions: {
// Keep Node built-ins external so the optional CLI entries (view
// compiler, i18n extractor) emit real `import('node:fs/promises')`
// calls instead of Vite's browser-external stub. Without this, the
// bundled CLIs crash at runtime ("e is not a function"). Browser entries
// never import `node:*`, so this is a no-op for them.
external: (id) => id.startsWith('node:'),
output: {
banner,
// Ensure proper external handling
Expand Down