eagerpatch / navita

Atomic CSS-in-JS with zero runtime
https://navita.style
MIT License
51 stars 0 forks source link

[Next.js] Edge Runtime not behaving correctly #23

Closed Zn4rK closed 11 months ago

Zn4rK commented 11 months ago

Using Navita imports directly inside routes that has

export const runtime = 'edge';

Causes the compiler to hang.

I can't remember the details of the Next.js implementation completely, but it might be caused by this line: https://github.com/vercel/next.js/blob/f3132354285fb18c290bf9aad7f8dc7e0550105d/packages/next/src/build/webpack/plugins/flight-client-entry-plugin.ts#L614

Needs investigation and replication.

Lines in Navita that we need to look into: https://github.com/eagerpatch/navita/blob/9e4ac18dd5fa9c5e74bc07290103d810f5a39588/packages/next-plugin/src/index.ts#L60-L78