fix(build): temp fix until css bundler rewrite
This commit is contained in:
parent
987f58f50b
commit
50f77b06e3
2
main.ts
2
main.ts
|
|
@ -8,7 +8,7 @@ app.use(staticFiles())
|
|||
// temp fix before updating cssBundler middleware
|
||||
app.use(async (ctx) => {
|
||||
const response = await ctx.next()
|
||||
if (response.status === 404) {
|
||||
if (response.status === 404 && !response.url.match(/\/chunk-\w+\.js.*/)) {
|
||||
const ext = ctx.url.pathname.split('.').at(-1) ?? '.bin'
|
||||
const mime = contentType(ext) ?? 'application/octet-stream'
|
||||
const file = await Deno.readFile(`./_fresh/static/${ctx.url.pathname}`)
|
||||
|
|
|
|||
Loading…
Reference in a new issue