vercel/ncc
Regression: dynamic runtime `require` works in 0.38.1 but breaks in 0.38.2
已關閉
#1,312 建立於 2026年3月16日
help wanted
倉庫指標
- 星標
- (8,841 顆星)
- PR 合併指標
- (平均合併 31天 15小時) (30 天內合併 7 個 PR)
描述
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: