Skip to content

Commit f717d37

Browse files
Fix: V6 ESM Server build (#844)
* externalize server-only in the Server ESM build to fix useFetchEligibleMethods error * chore: add changeset
1 parent 7f66db7 commit f717d37

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/two-pans-bake.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@paypal/react-paypal-js": patch
3+
---
4+
5+
Fixes an issue with the v6 server esm build that prevented useFetchEligibleMethods from being used.

packages/react-paypal-js/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export default [
137137
comments: "none",
138138
}),
139139
],
140-
external: ["react"],
140+
external: ["react", "server-only"],
141141
output: [
142142
{
143143
file: "dist/v6/esm/server.js",

0 commit comments

Comments
 (0)