Skip to content

Conversation

mohammedzamakhan
Copy link
Contributor

@mohammedzamakhan mohammedzamakhan commented Aug 31, 2025

Saw this blog post about fontless here https://qwik.dev/blog/fontless/, and got interested it to get in the epic-stack.

Test Plan

Checklist

  • Tests updated
  • Docs updated

Screenshots

Screenshot 2025-08-31 at 2 47 04 PM

Comment on lines +83 to +86
app.use(
'/_fonts',
express.static('build/client/_fonts', { immutable: true, maxAge: '1y' }),
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not happy about these lines, which I had to add for making it work in dev mode.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Could you also update the documentation on fonts?

Comment on lines +83 to +86
app.use(
'/_fonts',
express.static('build/client/_fonts', { immutable: true, maxAge: '1y' }),
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind

@mohammedzamakhan
Copy link
Contributor Author

@kentcdodds docs updated!

@kentcdodds
Copy link
Member

I was about ready to merge this and then I noticed when I started the dev server we get a bunch of warnings from MSW I would like you to clean up:

$ npm run dev

> dev
> cross-env NODE_ENV=development MOCKS=true node ./server/dev-server.js

Debugger listening on ws://127.0.0.1:9229/26190498-9779-4ab5-b586-d3ed858628ae
For help, see: https://nodejs.org/en/docs/inspector
🔶 Mock server installed
[MSW] Warning: intercepted a request without a matching request handler:

  • GET https://fonts.google.com/metadata/fonts

If you still wish to intercept this unhandled request, please create a request handler for it.
Read more: https://mswjs.io/docs/http/intercepting-requests
[MSW] Warning: intercepted a request without a matching request handler:

  • GET https://fonts.google.com/metadata/icons?key=material_symbols&incomplete=true?key=material_symbols&incomplete=true

If you still wish to intercept this unhandled request, please create a request handler for it.
Read more: https://mswjs.io/docs/http/intercepting-requests
[MSW] Warning: intercepted a request without a matching request handler:

  • GET https://fonts.bunny.net/list

If you still wish to intercept this unhandled request, please create a request handler for it.
Read more: https://mswjs.io/docs/http/intercepting-requests
[MSW] Warning: intercepted a request without a matching request handler:

  • GET https://api.fontshare.com/v2/fonts?offset=0&limit=100?offset=0&limit=100

If you still wish to intercept this unhandled request, please create a request handler for it.
Read more: https://mswjs.io/docs/http/intercepting-requests
[MSW] Warning: intercepted a request without a matching request handler:

  • GET https://api.fontsource.org/v1/fonts

If you still wish to intercept this unhandled request, please create a request handler for it.
Read more: https://mswjs.io/docs/http/intercepting-requests
[MSW] Warning: intercepted a request without a matching request handler:

  • GET https://fonts.google.com/metadata/fonts

If you still wish to intercept this unhandled request, please create a request handler for it.
Read more: https://mswjs.io/docs/http/intercepting-requests
[MSW] Warning: intercepted a request without a matching request handler:

  • GET https://fonts.google.com/metadata/icons?key=material_symbols&incomplete=true?key=material_symbols&incomplete=true

If you still wish to intercept this unhandled request, please create a request handler for it.
Read more: https://mswjs.io/docs/http/intercepting-requests
[MSW] Warning: intercepted a request without a matching request handler:

  • GET https://fonts.bunny.net/list

If you still wish to intercept this unhandled request, please create a request handler for it.
Read more: https://mswjs.io/docs/http/intercepting-requests
[MSW] Warning: intercepted a request without a matching request handler:

  • GET https://api.fontshare.com/v2/fonts?offset=0&limit=100?offset=0&limit=100

If you still wish to intercept this unhandled request, please create a request handler for it.
Read more: https://mswjs.io/docs/http/intercepting-requests
[MSW] Warning: intercepted a request without a matching request handler:

  • GET https://api.fontsource.org/v1/fonts

If you still wish to intercept this unhandled request, please create a request handler for it.
Read more: https://mswjs.io/docs/http/intercepting-requests
🚀  We have liftoff!
Local:            http://localhost:3000
On Your Network:  http://10.1.22.178:3000
Press Ctrl+C to stop

Two things:

  1. I'm concerned that this violates the offline development guiding principle. Is there any way to make this work offline?
  2. We should either intercept these with MSW (so it works offline), or implement a passthrough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants