@cloudwerk/cli 0.15.14 → 0.15.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +8 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -375,10 +375,16 @@ async function build(pathArg, options) {
375
375
  // Generate manifest.json for asset mapping
376
376
  rollupOptions: {
377
377
  input: "virtual:cloudwerk/client-entry",
378
- // Externalize @cloudwerk/* packages from client bundle — they are server-only.
378
+ // Externalize most @cloudwerk/* packages from client bundle — they are server-only.
379
379
  // stripServerExports removes loader/config, but residual imports (e.g., types)
380
380
  // can pull in node:async_hooks via the runtime context chain.
381
- external: [/^@cloudwerk\//],
381
+ // Exception: @cloudwerk/ui/client is the browser hydration code and MUST be bundled.
382
+ external: (id) => {
383
+ if (id === "@cloudwerk/ui/client" || id.startsWith("@cloudwerk/ui/client/")) {
384
+ return false;
385
+ }
386
+ return /^@cloudwerk\//.test(id);
387
+ },
382
388
  onwarn(warning, defaultHandler) {
383
389
  if (warning.code === "MODULE_LEVEL_DIRECTIVE" && warning.message.includes('"use client"')) {
384
390
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudwerk/cli",
3
- "version": "0.15.14",
3
+ "version": "0.15.15",
4
4
  "description": "Dev server, build, deploy commands for Cloudwerk",
5
5
  "repository": {
6
6
  "type": "git",