Skip to content

Commit

Permalink
fix: image -> image/x-icon (#7120)
Browse files Browse the repository at this point in the history
  • Loading branch information
poyoho committed Feb 28, 2022
1 parent 1bd54ca commit 065ceca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/playground/assets/__tests__/assets.spec.ts
Expand Up @@ -121,7 +121,7 @@ describe('css url() references', () => {
const match = isBuild ? `data:image/png;base64` : `/foo/nested/icon.png`
expect(await getBg('.css-url-base64-inline')).toMatch(match)
expect(await getBg('.css-url-quotes-base64-inline')).toMatch(match)
const icoMatch = isBuild ? `data:image;base64` : `favicon.ico`
const icoMatch = isBuild ? `data:image/x-icon;base64` : `favicon.ico`
const el = await page.$(`link.ico`)
const herf = await el.getAttribute('href')
expect(herf).toMatch(icoMatch)
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/asset.ts
Expand Up @@ -36,7 +36,7 @@ export function assetPlugin(config: ResolvedConfig): Plugin {

// add own dictionary entry by directly assigning mrmine
// https://github.com/lukeed/mrmime/issues/3
mrmime.mimes['ico'] = 'image'
mrmime.mimes['ico'] = 'image/x-icon'
return {
name: 'vite:asset',

Expand Down

0 comments on commit 065ceca

Please sign in to comment.