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.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
qs(or other packages which depend on them, likestripe), which containfunction-bindsolely 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_allowDynamicon 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.
qsmaintainer @ljharb says he will not drop thefunction-binddependency fromqsor other libraries he maintains.Proposal
Basically make this the default for
edgeusers, and if the user specifies their ownunstable_allowDynamicitems, concat them:(though this may not be sufficient with pnpm)
Beta Was this translation helpful? Give feedback.
All reactions