[edge] favor browser exports for edge compiler (#38319)
this is a regression from the previous implementation where Next.js compiled Middleware using the client compiler. We used to favor the browser exports over the `module` and `main`, which allowed packages like `debug` to work without any changes on Edge Functions. This is no longer the case, and this commit fixes that. Side note: I believe that in the future we will also have a different key to symbolize edge deployments. Maybe it will be `winter` to refer to WinterCG, but only time will tell! Another side note: we need to add support for import maps for advanced use cases. ## Bug - [ ] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
Showing
Please
register
or
sign in
to comment