No description
Find a file
Will Binns-Smith 147745bdb9 @next/font/google: scope font names (vercel/turbo#3049)
Fixes WEB-341

This incorporates a digest of the font request into the name of the
font-family defined in the stylesheet, used in the css class, and
returned to the JavaScript importer. This makes font-family names
returned from `@next/font/google` in stylesheets unguessable.

Note that this implementation uses 8-character long hex digests compared
to the 6-character version in Next.js+webpack.

Test Plan: imported Open Sans as a symbol, verified that stylesheet is
updated to reference both `@font-face` definitions and the css class
rules with `font-family: '__Open_Sans_3b020fa1';`. Verified that
exported js object `style.fontFamily` references the same.
2022-12-19 16:26:27 -08:00
packages/next-swc/crates @next/font/google: scope font names (vercel/turbo#3049) 2022-12-19 16:26:27 -08:00