fix: bundle CLI with Vite (#6893)

* fix: bundle CLI with Vite

* bundle dependencies as well

* remove unused dependencies
This commit is contained in:
Ben McCann 2024-02-03 19:39:01 -08:00 committed by GitHub
parent 329659b2fb
commit b4c211cad1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 178 additions and 638 deletions

17
cli/vite.config.ts Normal file
View file

@ -0,0 +1,17 @@
import { defineConfig } from 'vite';
export default defineConfig({
build: {
rollupOptions: {
input: 'src/index.ts',
output: {
dir: 'dist',
},
},
ssr: true,
},
ssr: {
// bundle everything except for Node built-ins
noExternal: /^(?!node:).*$/,
},
});