@netrojs/fnetro 0.2.1 → 0.2.20

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.
package/dist/server.js CHANGED
@@ -269,10 +269,8 @@ function createFNetro(config) {
269
269
  seo: mergeSEO(config.seo, pageSEO)
270
270
  });
271
271
  }
272
- const assets = isDev ? { scripts: [], styles: [] } : await resolveAssets(
273
- config.assets ?? {},
274
- config.assets?.manifestEntry ?? "client.ts"
275
- );
272
+ const clientEntry = config.assets?.manifestEntry ?? "client.ts";
273
+ const assets = isDev ? { scripts: [`/${clientEntry}`], styles: [] } : await resolveAssets(config.assets ?? {}, clientEntry);
276
274
  const html = await renderFullPage(route, data, pathname, params, config, assets);
277
275
  return c.html(html);
278
276
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netrojs/fnetro",
3
- "version": "0.2.1",
3
+ "version": "0.2.20",
4
4
  "description": "Full-stack Hono framework — SolidJS SSR/SPA, SEO, middleware, route groups, API routes",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/server.ts CHANGED
@@ -382,13 +382,16 @@ export function createFNetro(config: FNetroOptions): FNetroApp {
382
382
  })
383
383
  }
384
384
 
385
- // Full SSR — assets resolved once per process lifetime
385
+ // Full SSR — resolve assets
386
+ // Dev: inject the client entry as a module script. Vite intercepts the
387
+ // request, applies the SolidJS transform, and injects HMR.
388
+ // @hono/vite-dev-server only adds /@vite/client — it does NOT add
389
+ // your app's client.ts, so we must do it here.
390
+ // Prod: read hashed filenames from the Vite manifest.
391
+ const clientEntry = config.assets?.manifestEntry ?? 'client.ts'
386
392
  const assets = isDev
387
- ? { scripts: [], styles: [] } // Vite dev server injects assets
388
- : await resolveAssets(
389
- config.assets ?? {},
390
- config.assets?.manifestEntry ?? 'client.ts',
391
- )
393
+ ? { scripts: [`/${clientEntry}`], styles: [] }
394
+ : await resolveAssets(config.assets ?? {}, clientEntry)
392
395
 
393
396
  const html = await renderFullPage(route, data, pathname, params, config, assets)
394
397
  return c.html(html)