mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
d3169de7e5
Instead of hardcoding the list, we now automatically detect any `.browser` sibling and create a compiler alias for that module. Together with a linting rule, we'll ensure no future regressions are handled automatically (detection of conditional require and missing .browser sibling). This isn't the smoothest DX yet. Ideally we'd generate the list at Next.js compile time (i.e. before publishing) to avoid having to rerun a script (I'll follow-up). Generating the list during build time (next dev or next build) is just another tiny cost users would have to pay.