We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3182392 commit 12e2a54Copy full SHA for 12e2a54
1 file changed
index.js
@@ -2,7 +2,24 @@
2
* Created by tdzl2003 on 2/28/16.
3
*/
4
5
-var native = require('node-gyp-build')(__dirname);
+function loadNative() {
6
+ var platform = process.platform;
7
+ var arch = process.arch;
8
+
9
+ if (platform === 'darwin' && arch === 'arm64') {
10
+ return require('./prebuilds/darwin-arm64/node-bsdiff.node');
11
+ }
12
+ if (platform === 'linux' && arch === 'x64') {
13
+ return require('./prebuilds/linux-x64/node-bsdiff.node');
14
15
+ if (platform === 'linux' && arch === 'arm64') {
16
+ return require('./prebuilds/linux-arm64/node-bsdiff.node');
17
18
19
+ return require('node-gyp-build')(__dirname);
20
+}
21
22
+var native = loadNative();
23
exports.native = native;
24
25
function byteLength(value) {
0 commit comments