mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
the `next_font_loaders` transform replaces imports from `next/font` with slightly different ones. unfortunately it was inserting these imports **at the top** of the file, which broke the `server_actions` transform because it expects "use server"/"use cache" directives to be the first item in the file. this PR changes the logic in the font transform to insert the import in the place where the original `next/font` import occurred instead of at the top of the file. (i suppose that we could just reorder the transforms and run `server_actions` before `next_font_loaders`, but this feels more robust) Fixes #72179