@vyckr/tachyon 1.1.1 → 1.1.3
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/package.json +1 -1
- package/src/client/yon.ts +4 -2
package/package.json
CHANGED
package/src/client/yon.ts
CHANGED
|
@@ -253,8 +253,10 @@ export default class Yon {
|
|
|
253
253
|
|
|
254
254
|
for(const route of routes) {
|
|
255
255
|
|
|
256
|
+
const file = Bun.file(`${Router.assetsPath}/${route}`)
|
|
257
|
+
|
|
256
258
|
Router.reqRoutes[`/assets/${route}`] = {
|
|
257
|
-
GET: async () => new Response(await
|
|
259
|
+
GET: async () => new Response(await file.bytes(), { headers: { 'Content-Type': file.type }})
|
|
258
260
|
}
|
|
259
261
|
}
|
|
260
262
|
}
|
|
@@ -274,7 +276,7 @@ export default class Yon {
|
|
|
274
276
|
|
|
275
277
|
const { html, script, style } = Yon.extractComponents(data)
|
|
276
278
|
|
|
277
|
-
await Yon.addToStatix(html, script, style, `${route}.${script
|
|
279
|
+
await Yon.addToStatix(html, script, style, `${route}.${script?.lang || 'js'}`, 'pages')
|
|
278
280
|
}
|
|
279
281
|
}
|
|
280
282
|
|