fix: docs islands not hydrated on safari 12 (#1837)

This commit is contained in:
Marvin Hagemeister
2023-10-02 10:26:16 +02:00
committed by GitHub
parent 40649fbd55
commit 453cf0704e
3 changed files with 9 additions and 0 deletions
+1
View File
@@ -1,3 +1,4 @@
import "../polyfills.ts";
import {
Component,
ComponentChildren,
+5
View File
@@ -0,0 +1,5 @@
// Polyfill for old safari versions
if (typeof globalThis === "undefined") {
// @ts-ignore polyfill
window.globalThis = window;
}
+3
View File
@@ -3,5 +3,8 @@ import twindConfig from "./twind.config.ts";
import { defineConfig } from "$fresh/server.ts";
export default defineConfig({
build: {
target: "safari12",
},
plugins: [twindPlugin(twindConfig)],
});