fix(bindings): Don't require unnecessary package (#6902)

This commit is contained in:
AsPulse 2023-02-06 04:48:15 +09:00 committed by GitHub
parent c223113338
commit 964dfbaf1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,15 +102,6 @@ switch (platform) {
}
break
case 'darwin':
localFileExisted = existsSync(join(__dirname, 'swc.darwin-universal.node'))
try {
if (localFileExisted) {
nativeBinding = require('./swc.darwin-universal.node')
} else {
nativeBinding = require('@swc/core-darwin-universal')
}
break
} catch {}
switch (arch) {
case 'x64':
localFileExisted = existsSync(join(__dirname, 'swc.darwin-x64.node'))