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
fix(pack): bundle @tsdown/exe and @tsdown/css into core (#1919)
## Problem
`@tsdown/exe` and `@tsdown/css` hard-peer-depend on `tsdown` and import
`tsdown/internal`, but Vite+ bundles tsdown internally with no
resolvable top-level `tsdown` package. Installing them at the project
level fails with `Failed to import module "@tsdown/exe"` (and the
equivalent for CSS bundling).
## Fix
Bundle both extensions into core (`tsdown-exe.js`, `tsdown-css.js`) so
`tsdown/internal` resolves at build time and `vp pack --exe` / CSS
bundling work with no extra install. `lightningcss` (native, cannot be
bundled) becomes an optional peer, loaded lazily with an actionable
error when it is missing.
## Tests
- `command-pack-css`: CSS transforms run through the bundled
`@tsdown/css` + lightningcss.
- `command-pack-tsdown-extensions`: the bundled exe/css chunks load
without a top-level `tsdown`.
Closes#1586
Copy file name to clipboardExpand all lines: docs/guide/pack.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,4 +58,12 @@ export default defineConfig({
58
58
});
59
59
```
60
60
61
+
Executable support is bundled into Vite+, so you do not need to install `@tsdown/exe` separately.
62
+
63
+
Building executables uses Node's [Single Executable Applications](https://nodejs.org/api/single-executable-applications.html) support and requires Node.js 25.7.0 or later. Switch the active runtime with `vp env use 26` if `vp pack --exe` reports an unsupported version.
64
+
61
65
See the official [tsdown executable docs](https://tsdown.dev/options/exe#executable) for details about configuring custom file names, embedded assets, and cross-platform targets.
66
+
67
+
## CSS Bundling
68
+
69
+
`vp pack` can transform and bundle CSS (including CSS Modules and [Lightning CSS](https://lightningcss.dev/) optimizations) for your entry points. This support is bundled into Vite+, so you do not need to install `@tsdown/css` or `lightningcss` separately, it works out of the box.
0 commit comments