Skip to content

Commit

Permalink
Correct resource type font set
Browse files Browse the repository at this point in the history
  • Loading branch information
notlee committed May 28, 2020
1 parent 1e9912a commit ebf71da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ describe('dotcom-ui-shell/src/lib/getResourceType', () => {
expect(subject('style.css')).toEqual('style')
expect(subject('script.js')).toEqual('script')
expect(subject('image.png')).toEqual('image')
expect(subject('font.woff')).toEqual('font')
expect(subject('font.woff2')).toEqual('font')
})

Expand Down
2 changes: 1 addition & 1 deletion packages/dotcom-ui-shell/src/lib/getResourceType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const ScriptFiles = new Set(['.js', '.mjs'])

const ImageFiles = new Set(['.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp'])

const FontFiles = new Set(['.woff2', '.woff22', '.otf', '.ttf', '.eot'])
const FontFiles = new Set(['.woff', '.woff2', '.otf', '.ttf', '.eot'])

export default (file: string): string => {
// Always parse the file so that we can ignore any domain names, query strings etc.
Expand Down

0 comments on commit ebf71da

Please sign in to comment.