/ concept-collection / fastandaccurate
Sign in
concept-collection / fastandaccurate
fastandaccurate / vite.cli.config.ts
32 lines · 951 BCodeBlameHistory
2 * The command line's bundle: the same harness source as the page, built
3 * for node. numbl is pure TypeScript/JavaScript, so everything bundles
4 * and the published package has no dependencies at all. The MATLAB
5 * sources are not bundled; pack-cli.mjs copies them into the tarball and
6 * the CLI reads them from disk beside itself, so the installed package
7 * shows the exact solver code it runs.
8 */
9import { defineConfig, mergeConfig } from "vite";
10import base from "./vite.config";
12export default mergeConfig(
13 base,
14 defineConfig({
15 ssr: {
16 // Bundle everything (numbl included); the published tarball has no
17 // dependencies.
18 noExternal: true,
19 },
20 build: {
21 ssr: "src/cli/main.ts",
22 outDir: "dist-cli",
23 target: "node20",
24 emptyOutDir: true,
25 minify: false,
26 rollupOptions: {
27 input: "src/cli/main.ts",
28 output: { entryFileNames: "main.js" },
29 },
30 },
31 })
32);
moveopenescclose