Skip to content

Commit c26908a

Browse files
authored
fix(browser): add navigator polifilly for wechat mini (#1796)
Fixes #1789
1 parent f064d48 commit c26908a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

esbuild.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,15 @@ const options = {
2020
polyfillNode({
2121
polyfills: [
2222
'readable-stream'
23-
]
23+
],
24+
globals: {
25+
global: false,
26+
__dirname: false,
27+
__filename: false,
28+
buffer: true,
29+
process: true,
30+
navigator: true, // Needed for WeChat, ref #1789
31+
}
2432
}),
2533
],
2634
}

0 commit comments

Comments
 (0)