You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3.**Core Package Export Sync** - Re-export `@voidzero-dev/vite-plus-core` under `./client`, `./types/*`, etc.
12
12
4.**Test Package Export Sync** - Re-export `@voidzero-dev/vite-plus-test` under `./test/*`
@@ -15,21 +15,26 @@ This architecture allows users to import everything from a single package (`vite
15
15
16
16
## Build Steps
17
17
18
-
### Step 1: TypeScript Compilation (`buildCli`)
18
+
### Step 1: tsdown Build (`buildWithTsdown`)
19
19
20
-
Compiles TypeScript source files using the TypeScript compiler API:
20
+
Bundles all CLI entry points using tsdown (configured in `tsdown.config.ts`). The config defines two builds:
21
21
22
-
```typescript
23
-
const program =createProgram({
24
-
rootNames: fileNames,
25
-
options,
26
-
host,
27
-
});
28
-
program.emit();
29
-
```
22
+
**ESM build** — bundles all entry points to `dist/`:
23
+
24
+
- Public API entries: `bin`, `index`, `define-config`, `fmt`, `lint`, `pack`, `pack-bin`
25
+
- Global command entries: `create`, `migrate`, `version`, `config`, `mcp`, `staged`
26
+
- All third-party dependencies are inlined at build time
27
+
- Only packages that must be resolved at runtime stay external (NAPI binding, `@voidzero-dev/vite-plus-core`, `@voidzero-dev/vite-plus-test`, `oxfmt`, `oxlint`)
28
+
- Code splitting creates shared chunks for code used by multiple entries
29
+
- DTS (`.d.ts`) files are generated for all entries
0 commit comments