diff --git a/src/runtime/entrypoints/main.ts b/src/runtime/entrypoints/main.ts index 4bea985a..8665f2d1 100644 --- a/src/runtime/entrypoints/main.ts +++ b/src/runtime/entrypoints/main.ts @@ -1,3 +1,4 @@ +import "../polyfills.ts"; import { Component, ComponentChildren, diff --git a/src/runtime/polyfills.ts b/src/runtime/polyfills.ts new file mode 100644 index 00000000..948fa5f1 --- /dev/null +++ b/src/runtime/polyfills.ts @@ -0,0 +1,5 @@ +// Polyfill for old safari versions +if (typeof globalThis === "undefined") { + // @ts-ignore polyfill + window.globalThis = window; +} diff --git a/www/fresh.config.ts b/www/fresh.config.ts index 4b076dd4..67aa3598 100644 --- a/www/fresh.config.ts +++ b/www/fresh.config.ts @@ -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)], });