Skip to content

Commit 75d01f1

Browse files
authored
fix: remove externalsPresets.node (#1318)
1 parent 79b47e9 commit 75d01f1

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

packages/core/src/config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,6 +1642,9 @@ const composeTargetConfig = (
16421642
config: {
16431643
tools: {
16441644
rspack: {
1645+
externalsPresets: {
1646+
node: false,
1647+
},
16451648
target: ['node'],
16461649
},
16471650
},

packages/core/tests/__snapshots__/config.test.ts.snap

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,9 @@ exports[`Should compose create Rsbuild config correctly > Enable experiment.adva
713713
__dirname: false,
714714
__filename: false
715715
},
716+
externalsPresets: {
717+
node: false
718+
},
716719
externalsType: 'module-import'
717720
}",
718721
]
@@ -1739,6 +1742,9 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
17391742
__dirname: false,
17401743
__filename: false
17411744
},
1745+
externalsPresets: {
1746+
node: false
1747+
},
17421748
externalsType: 'module-import'
17431749
}",
17441750
"{
@@ -2447,6 +2453,9 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
24472453
'<WORKSPACE>/src/index.ts'
24482454
]
24492455
},
2456+
externalsPresets: {
2457+
node: false
2458+
},
24502459
externalsType: 'commonjs-import'
24512460
}",
24522461
"{
@@ -3060,6 +3069,9 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
30603069
'<WORKSPACE>/src/index.ts'
30613070
]
30623071
},
3072+
externalsPresets: {
3073+
node: false
3074+
},
30633075
externalsType: 'umd'
30643076
}",
30653077
"{
@@ -3674,6 +3686,9 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
36743686
'<WORKSPACE>/src/index.ts'
36753687
]
36763688
},
3689+
externalsPresets: {
3690+
node: false
3691+
},
36773692
externalsType: 'global'
36783693
}",
36793694
"{
@@ -4507,6 +4522,9 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
45074522
},
45084523
},
45094524
{
4525+
"externalsPresets": {
4526+
"node": false,
4527+
},
45104528
"target": [
45114529
"node",
45124530
],
@@ -4791,6 +4809,9 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
47914809
},
47924810
},
47934811
{
4812+
"externalsPresets": {
4813+
"node": false,
4814+
},
47944815
"target": [
47954816
"node",
47964817
],
@@ -5036,6 +5057,9 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
50365057
},
50375058
},
50385059
{
5060+
"externalsPresets": {
5061+
"node": false,
5062+
},
50395063
"target": [
50405064
"node",
50415065
],
@@ -5280,6 +5304,9 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
52805304
},
52815305
},
52825306
{
5307+
"externalsPresets": {
5308+
"node": false,
5309+
},
52835310
"target": [
52845311
"node",
52855312
],

0 commit comments

Comments
 (0)