@cloudwerk/cli 0.15.2 → 0.15.6

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 +17 -0
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -375,6 +375,12 @@ async function build(pathArg, options) {
375
375
  // Generate manifest.json for asset mapping
376
376
  rollupOptions: {
377
377
  input: "virtual:cloudwerk/client-entry",
378
+ onwarn(warning, defaultHandler) {
379
+ if (warning.code === "MODULE_LEVEL_DIRECTIVE" && warning.message.includes('"use client"')) {
380
+ return;
381
+ }
382
+ defaultHandler(warning);
383
+ },
378
384
  output: {
379
385
  entryFileNames: "__cloudwerk/client-[hash].js",
380
386
  chunkFileNames: "__cloudwerk/[name]-[hash].js",
@@ -444,6 +450,8 @@ async function build(pathArg, options) {
444
450
  // Don't clear - client assets are already there
445
451
  minify: minify ? "esbuild" : false,
446
452
  sourcemap,
453
+ // Use esnext target to support top-level await (used by React renderer init)
454
+ target: "esnext",
447
455
  ssr: true,
448
456
  // Emit CSS and other assets from SSR build (CSS imported in layouts, etc.)
449
457
  ssrEmitAssets: true,
@@ -451,6 +459,15 @@ async function build(pathArg, options) {
451
459
  input: tempEntryPath,
452
460
  // Externalize Node.js builtins (polyfilled by nodejs_compat in Workers)
453
461
  external: [...builtinModules, /^node:/],
462
+ onwarn(warning, defaultHandler) {
463
+ if (warning.code === "MODULE_LEVEL_DIRECTIVE" && warning.message.includes('"use client"')) {
464
+ return;
465
+ }
466
+ if (warning.code === "MISSING_EXPORT") {
467
+ return;
468
+ }
469
+ defaultHandler(warning);
470
+ },
454
471
  output: {
455
472
  entryFileNames: "index.js",
456
473
  // Put assets in static directory to be served by Cloudflare
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudwerk/cli",
3
- "version": "0.15.2",
3
+ "version": "0.15.6",
4
4
  "description": "Dev server, build, deploy commands for Cloudwerk",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,9 +31,9 @@
31
31
  "picocolors": "^1.1.0",
32
32
  "wrangler": "^4.0.0",
33
33
  "vite": "^6.0.0",
34
- "@cloudwerk/core": "^0.15.1",
35
- "@cloudwerk/ui": "^0.15.1",
36
- "@cloudwerk/vite-plugin": "^0.6.5"
34
+ "@cloudwerk/core": "^0.15.3",
35
+ "@cloudwerk/vite-plugin": "^0.6.8",
36
+ "@cloudwerk/ui": "^0.15.6"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^20.0.0",