适配pwa开发

pull/1/head
yutent 2023-02-16 14:54:37 +08:00
parent c1ccba6103
commit d40719b769
2 changed files with 3 additions and 0 deletions

View File

@ -202,6 +202,8 @@ export default async function createServer(root = '', conf = {}) {
break break
case 'webmanifest':
case 'json':
case 'png': case 'png':
case 'jpg': case 'jpg':
case 'jpeg': case 'jpeg':

View File

@ -14,6 +14,7 @@ const MIME_TYPES = {
bmp: 'image/x-ms-bmp', bmp: 'image/x-ms-bmp',
js: 'application/javascript;charset=utf-8', js: 'application/javascript;charset=utf-8',
json: 'application/json;charset=utf-8', json: 'application/json;charset=utf-8',
webmanifest: 'application/json;charset=utf-8',
mp3: 'audio/mpeg', mp3: 'audio/mpeg',
ogg: 'audio/ogg', ogg: 'audio/ogg',
m4a: 'audio/x-m4a', m4a: 'audio/x-m4a',