Skip to content

Commit bf0f6db

Browse files
committed
fix node condition
1 parent 2d91920 commit bf0f6db

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/core/package-manager/src/NodePackageManager.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import {transformSync} from '@swc/core';
3636
// Package.json fields. Must match package_json.rs.
3737
const MAIN = 1 << 0;
3838
const SOURCE = 1 << 2;
39+
const NODE_CONDITION = 1 << 3;
3940
const SOURCE_CONDITION = 1 << 17;
4041
const ENTRIES =
4142
MAIN |
@@ -46,8 +47,8 @@ const ENTRIES =
4647

4748
const CONDITIONS =
4849
process.env.PARCEL_BUILD_ENV !== 'production' || process.env.PARCEL_SELF_BUILD
49-
? SOURCE_CONDITION
50-
: 0;
50+
? NODE_CONDITION | SOURCE_CONDITION
51+
: NODE_CONDITION;
5152

5253
const NODE_MODULES = `${path.sep}node_modules${path.sep}`;
5354

0 commit comments

Comments
 (0)