vercel / geist-font

https://vercel.com/font
SIL Open Font License 1.1
2.13k stars 54 forks source link

Bundle and use dual package #32

Open huozhi opened 8 months ago

huozhi commented 8 months ago

The package was marked as a pure ESM package, which could potential break some upstream packages if they're mixing it with CJS. If it's not fully bundled then it might break the CJS require.

Error [ERR_REQUIRE_ESM]: require() of ES Module .next/server/pages/_app.js not supported.
Instead change the require of font.js in .next/server/pages/_app.js to a dynamic import() which is available in all CommonJS modules.

This PR makes it become a dual package which supports both CJS and ESM

TBD