Skip to content

Commit

Permalink
ref
Browse files Browse the repository at this point in the history
  • Loading branch information
ericfortis committed Sep 19, 2023
1 parent 6fe2ece commit f9deb6f
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions static-pages-bundler/routerForStaticPages.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ import fs from 'node:fs'


const mimes = { // JPG is deliberately omitted (explained in ./media-optimizer)
'html': 'text/html; charset=utf8',
'txt': 'text/plain; charset=utf8', // e.g. robots.txt when running lighthouse
'js': 'application/javascript; charset=utf8',
'json': 'application/json; charset=utf8',
'css': 'text/css; charset=utf8',
'less': 'text/plain; charset=utf8',
'svg': 'image/svg+xml; charset=utf8',
'zip': 'application/zip',
'ico': 'image/x-icon',
'png': 'image/png',
'avif': 'image/avif',
'webp': 'image/webp',
'mp4': 'video/mp4'
html: 'text/html; charset=utf8',
txt: 'text/plain; charset=utf8', // e.g. robots.txt when running lighthouse
js: 'application/javascript; charset=utf8',
json: 'application/json; charset=utf8',
css: 'text/css; charset=utf8',
less: 'text/plain; charset=utf8',
svg: 'image/svg+xml; charset=utf8',
zip: 'application/zip',
ico: 'image/x-icon',
png: 'image/png',
avif: 'image/avif',
mp4: 'video/mp4',
webp: 'image/webp'
}
function mimeFor(filename) {
const mime = mimes[filename.replace(/.*\./, '')]
Expand Down

0 comments on commit f9deb6f

Please sign in to comment.