Skip to content

Commit 3dd150d

Browse files
committed
Merge branch 'master' of github.com:parcel-bundler/parcel-css
2 parents 9202403 + 0db15a8 commit 3dd150d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

scripts/build-npm.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ const sysToNodePlatform = {
2424
darwin: 'darwin',
2525
windows: 'win32',
2626
};
27+
const abiToNodeLibc = {
28+
gnu: 'glibc',
29+
};
2730

2831
let optionalDependencies = {};
2932
let cliOptionalDependencies = {};
@@ -75,8 +78,8 @@ function buildNode(triple, cpu, os, abi, t) {
7578
pkg2.name += '-' + t;
7679
pkg2.os = [os];
7780
pkg2.cpu = [cpu];
78-
if (abi) {
79-
pkg2.libc = [abi];
81+
if (abi && os !== "win32") {
82+
pkg2.libc = [abiToNodeLibc[abi] || abi];
8083
}
8184
pkg2.main = name;
8285
pkg2.files = [name];
@@ -105,8 +108,8 @@ function buildCLI(triple, cpu, os, abi, t) {
105108
pkg2.os = [os];
106109
pkg2.cpu = [cpu];
107110
pkg2.files = [binary];
108-
if (abi) {
109-
pkg2.libc = [abi];
111+
if (abi && os !== "win32") {
112+
pkg2.libc = [abiToNodeLibc[abi] || abi];
110113
}
111114
delete pkg2.main;
112115
delete pkg2.napi;

0 commit comments

Comments
 (0)