Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug:node 场景下 try { require('node module') } 没有被 ignore #1258

Closed
sorrycc opened this issue Jun 7, 2024 · 0 comments · Fixed by #1264
Closed

Bug:node 场景下 try { require('node module') } 没有被 ignore #1258

sorrycc opened this issue Jun 7, 2024 · 0 comments · Fixed by #1264
Labels
bug Something isn't working

Comments

@sorrycc
Copy link
Member

sorrycc commented Jun 7, 2024

需求来自式夏, chair function 的构建。

比如 https://unpkg.com/browse/undici@5.28.4/index.js

let hasCrypto
try {
  require('crypto')
  hasCrypto = true
} catch {
  hasCrypto = false
}

hasCrypto 会被处理为 false,这在 node 下不符合预期吧。

@sorrycc sorrycc added the bug Something isn't working label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant