Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

fix: add Intl polyfill for SSR

goenning930cc4b79024
diff --git a/esbuild-shim.js b/esbuild-shim.js
index 4007b848a..2b44236c4 100644
--- a/esbuild-shim.js
+++ b/esbuild-shim.js
@@ -17,7 +17,18 @@ const window = {
}
const navigator = {}
-
global.navigator = navigator
global.window = window
global.document = document
+
+// Intl polyfill is required until v8go supports Intl
+class NoopFormat {
+ format(arg0) {
+ return arg0 ? arg0.toString() : ""
+ }
+}
+
+global.Intl = {
+ NumberFormat: NoopFormat,
+ DateTimeFormat: NoopFormat,
+}