Ignore function-bind
npm package in unstable_allowDynamic
by default for edge
#51910
Replies: 3 comments
-
This is 100% fine, fwiw, to replace |
Beta Was this translation helpful? Give feedback.
-
What's not explicitly called out in this discussion so far as well is that, at least as far as I'm aware, the unsafe code in |
Beta Was this translation helpful? Give feedback.
-
Resolved in #52009 🎉 |
Beta Was this translation helpful? Give feedback.
-
Goals
qs
(or other packages which depend on them, likestripe
), which containfunction-bind
solely as a polyfill for old environments.qs
(or similar) to claim they support Next.JS and Vercel without caveats, or without needing to tell users to modify their configs. (This is me).Non-Goals
You could choose to find other common packages that need to be ignored, and ignore them by default too, but I don't have an opinion there.
This does not aim to address turning
unstable_allowDynamic
on for user code by default.Background
The docs for this feature mention this package: https://nextjs.org/docs/messages/edge-dynamic-code-evaluation so I assume it's quite common.
qs
maintainer @ljharb says he will not drop thefunction-bind
dependency fromqs
or other libraries he maintains.Proposal
Basically make this the default for
edge
users, and if the user specifies their ownunstable_allowDynamic
items, concat them:(though this may not be sufficient with pnpm)
Beta Was this translation helpful? Give feedback.
All reactions