@zenithbuild/core 0.4.5 → 0.4.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.
@@ -143,18 +143,19 @@ export async function dev(options: DevOptions = {}): Promise<void> {
143
143
 
144
144
  if (filename.endsWith('.zen')) {
145
145
  logger.hmr('Page', filename)
146
+
147
+ // Clear page cache to force fresh compilation on next request
148
+ pageCache.clear()
149
+
146
150
  // Recompile CSS for new Tailwind classes in .zen files
147
151
  if (globalsCssPath) {
148
152
  const cssResult = await compileCssAsync({ input: globalsCssPath, output: ':memory:' })
149
153
  if (cssResult.success) {
150
154
  compiledCss = cssResult.css
151
- // Notify clients of CSS update
152
- for (const client of clients) {
153
- client.send(JSON.stringify({ type: 'style-update', url: '/assets/styles.css' }))
154
- }
155
155
  }
156
156
  }
157
- // Broadcast page reload
157
+
158
+ // Broadcast page reload AFTER cache cleared and CSS ready
158
159
  for (const client of clients) {
159
160
  client.send(JSON.stringify({ type: 'reload' }))
160
161
  }
package/dist/cli.js CHANGED
@@ -5,6 +5,8 @@
5
5
  #!/usr/bin/env bun
6
6
  #!/usr/bin/env bun
7
7
  #!/usr/bin/env bun
8
+ #!/usr/bin/env bun
9
+ #!/usr/bin/env bun
8
10
  // @bun
9
11
  var __create = Object.create;
10
12
  var __getProtoOf = Object.getPrototypeOf;