Skip to content

Commit

Permalink
Bug fix: Font optimization (vercel#15984)
Browse files Browse the repository at this point in the history
Bug fix
- Do not remove spaces as it might mangle font names
  • Loading branch information
prateekbh committed Aug 8, 2020
1 parent 6f7dfe1 commit d8edb2e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/next-server/lib/post-process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class FontOptimizerMiddleware implements PostProcessMiddleware {
result = result.replace(
'</head>',
`<style data-href="${url}">${fontContent.replace(
/(\n|\s)/g,
/(\n)/g,
''
)}</style></head>`
)
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7791,6 +7791,11 @@ he@1.1.1:
resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd"
integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0=

he@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd"
integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0=

header-case@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/header-case/-/header-case-1.0.1.tgz#9535973197c144b09613cd65d317ef19963bd02d"
Expand Down

0 comments on commit d8edb2e

Please sign in to comment.