Skip to content

Commit a87d5d8

Browse files
Add esbuild node_bundler configuration to fix 502 error
- Add node_bundler = 'esbuild' to support ESM imports in functions - This fixes the 502 error caused by node-fetch v3 ESM import requirements - Functions now properly support modern JavaScript import syntax
1 parent 877f5e5 commit a87d5d8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

netlify.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919

2020
functions = "netlify/functions-all"
2121

22+
[functions]
23+
node_bundler = "esbuild"
24+
2225
[build.environment]
2326
NODE_VERSION = "22"
2427

0 commit comments

Comments
 (0)