LeRobot.js / packages /cli /vite.config.ts
NERDDISCO
feat: added node support (#8)
bdc1ac8 unverified
raw
history blame contribute delete
614 Bytes
import { defineConfig } from "vite";
export default defineConfig({
build: {
target: "node18",
lib: {
entry: {
cli: "src/cli.ts",
index: "src/index.ts",
},
formats: ["es"],
},
rollupOptions: {
external: [
// Node.js built-ins
"fs",
"fs/promises",
"path",
"os",
"readline",
"util",
"events",
"stream",
// External dependencies
"@lerobot/node",
"chalk",
"commander",
"serialport",
],
},
minify: false,
sourcemap: true,
},
});