vercel/ncc
Regression: dynamic runtime `require` works in 0.38.1 but breaks in 0.38.2
Fermée
#1 312 ouverte le 16 mars 2026
help wanted
Métriques du dépôt
- Stars
- (8 841 étoiles)
- Métriques de merge PR
- (Merge moyen 31j 15h) (7 PRs mergées en 30 j)
Description
0.38.1
I have the following source code:
The dynamic require is compiled into the following code:
0.38.2
The same code is compiled into the following code since 0.38.2:
Workaround
My current workaround is to use dynamic import inside a new Function() (because dynamic import isn't supported either). I have to change to code into this: