diff --git a/astro.config.mjs b/astro.config.mjs index 964e9d2..d96ead6 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,6 +4,8 @@ import { visualizer } from "rollup-plugin-visualizer"; import preact from "@astrojs/preact"; +import partytown from "@astrojs/partytown"; + // https://astro.build/config export default defineConfig({ @@ -14,8 +16,14 @@ export default defineConfig({ cssCodeSplit: true, chunkSizeWarningLimit: 20, }, + optimizeDeps: { + force: true, + }, plugins: [visualizer()], }, - integrations: [preact()], + integrations: [ + preact(), + partytown({ config: { forward: ["dataLayer.push"] } }), + ], }); diff --git a/package.json b/package.json index 5da089d..92232ab 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "format": "yarn biome check --write" }, "dependencies": { + "@astrojs/partytown": "^2.1.2", "@astrojs/preact": "^3.5.3", "preact": "^10.24.3", "react-snowfall": "^2.1.1" diff --git a/src/pages/about.astro b/src/pages/about.astro index cb8e72b..1a6e250 100644 --- a/src/pages/about.astro +++ b/src/pages/about.astro @@ -13,6 +13,16 @@ import { Snow } from "../components/Snow.tsx"; + + + + + {pageTitle} diff --git a/src/pages/blog.astro b/src/pages/blog.astro index 1e64c0d..b88173b 100644 --- a/src/pages/blog.astro +++ b/src/pages/blog.astro @@ -11,6 +11,15 @@ import { Snow } from "../components/Snow.tsx"; {pageTitle} + + + + diff --git a/src/pages/index.astro b/src/pages/index.astro index 0750396..e8563f8 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -15,6 +15,15 @@ import { Snow } from "../components/Snow.tsx"; {pageTitle} + + + + diff --git a/src/pages/links.astro b/src/pages/links.astro index fbb7a5d..a5ba436 100644 --- a/src/pages/links.astro +++ b/src/pages/links.astro @@ -14,6 +14,15 @@ import { Snow } from "../components/Snow.tsx"; {pageTitle} + + + + diff --git a/yarn.lock b/yarn.lock index 4d43bf0..e63cd5a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -78,6 +78,14 @@ unist-util-visit-parents "^6.0.1" vfile "^6.0.3" +"@astrojs/partytown@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@astrojs/partytown/-/partytown-2.1.2.tgz#2df6745eb6add076e721ebd7e32c1bcd28063d1f" + integrity sha512-1a9T5lqxtnrw0qLPo1KwliUvaaUzPNPtWucD8VxdwT7zqcpODFk1RzGgAgqVo+YhutFrTu/qclbtnOfXBuskjw== + dependencies: + "@builder.io/partytown" "^0.10.2" + mrmime "^2.0.0" + "@astrojs/preact@^3.5.3": version "3.5.3" resolved "https://registry.yarnpkg.com/@astrojs/preact/-/preact-3.5.3.tgz#91ff5f0aafedb79eaa311d8bae4e24c62dcc83d0" @@ -342,6 +350,11 @@ resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-1.9.4.tgz#4c7afa90e3970213599b4095e62f87e5972b2340" integrity sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA== +"@builder.io/partytown@^0.10.2": + version "0.10.2" + resolved "https://registry.yarnpkg.com/@builder.io/partytown/-/partytown-0.10.2.tgz#102c909f805c945a638e249275003ef6ba828287" + integrity sha512-A9U+4PREWcS+CCYzKGIPovtGB/PBgnH/8oQyCE6Nr9drDJk6cMPpLQIEajpGPmG9tYF7N3FkRvhXm/AS9+0iKg== + "@emmetio/abbreviation@^2.3.3": version "2.3.3" resolved "https://registry.yarnpkg.com/@emmetio/abbreviation/-/abbreviation-2.3.3.tgz#ed2b88fe37b972292d6026c7c540aaf887cecb6e"