fix: disable source map bundle
This commit is contained in:
parent
eff591b427
commit
342c724dda
|
@ -12,8 +12,19 @@ export function cssHandler(sourceDir: string): MiddlewareHandler {
|
|||
if (
|
||||
ctx.url.pathname.startsWith('/') && ctx.url.pathname.endsWith('.css')
|
||||
) {
|
||||
const filename = join(assetDir, ctx.url.pathname)
|
||||
|
||||
if (ctx.url.pathname.endsWith('.map.css')) {
|
||||
const file = await Deno.readFile(filename)
|
||||
return new Response(file, {
|
||||
headers: {
|
||||
'Content-Type': 'application/json; charset=utf-8',
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
await bundleCss(sourceDir, assetDir, ctx.url.pathname, ctx.config.dev)
|
||||
const file = await Deno.readFile(join(assetDir, ctx.url.pathname))
|
||||
const file = await Deno.readFile(filename)
|
||||
return new Response(file, {
|
||||
headers: {
|
||||
'Content-Type': 'text/css; charset=utf-8',
|
||||
|
|
Loading…
Reference in a new issue