added partytown
620b8889
4 file(s) · +55 −27
| 7 | 7 | import nordTheme from "./nord.json"; |
|
| 8 | 8 | ||
| 9 | 9 | // https://astro.build/config |
|
| 10 | + | import partytown from "@astrojs/partytown"; |
|
| 11 | + | ||
| 12 | + | // https://astro.build/config |
|
| 10 | 13 | export default defineConfig({ |
|
| 11 | - | site: "https://stevedsimkins.dev", |
|
| 12 | - | markdown: { |
|
| 13 | - | shikiConfig: { |
|
| 14 | - | theme: nordTheme, |
|
| 15 | - | wrap: true, |
|
| 16 | - | }, |
|
| 17 | - | }, |
|
| 18 | - | integrations: [ |
|
| 19 | - | mdx({}), |
|
| 20 | - | tailwind({ |
|
| 21 | - | config: { |
|
| 22 | - | applyBaseStyles: false, |
|
| 23 | - | }, |
|
| 24 | - | }), |
|
| 25 | - | image({ |
|
| 26 | - | serviceEntryPoint: "@astrojs/image/sharp", |
|
| 27 | - | }), |
|
| 28 | - | sitemap(), |
|
| 29 | - | prefetch(), |
|
| 30 | - | ], |
|
| 31 | - | vite: { |
|
| 32 | - | optimizeDeps: { |
|
| 33 | - | exclude: ["@resvg/resvg-js"], |
|
| 34 | - | }, |
|
| 35 | - | }, |
|
| 14 | + | site: "https://stevedsimkins.dev", |
|
| 15 | + | markdown: { |
|
| 16 | + | shikiConfig: { |
|
| 17 | + | theme: nordTheme, |
|
| 18 | + | wrap: true |
|
| 19 | + | } |
|
| 20 | + | }, |
|
| 21 | + | integrations: [mdx({}), tailwind({ |
|
| 22 | + | config: { |
|
| 23 | + | applyBaseStyles: false |
|
| 24 | + | } |
|
| 25 | + | }), image({ |
|
| 26 | + | serviceEntryPoint: "@astrojs/image/sharp" |
|
| 27 | + | }), sitemap(), prefetch(), partytown({ |
|
| 28 | + | config: { |
|
| 29 | + | forward: ["dataLayer.push"] |
|
| 30 | + | } |
|
| 31 | + | })], |
|
| 32 | + | vite: { |
|
| 33 | + | optimizeDeps: { |
|
| 34 | + | exclude: ["@resvg/resvg-js"] |
|
| 35 | + | } |
|
| 36 | + | } |
|
| 36 | 37 | }); |
| 8 | 8 | "name": "astro-cactus", |
|
| 9 | 9 | "version": "2.1.0", |
|
| 10 | 10 | "dependencies": { |
|
| 11 | + | "@astrojs/partytown": "^1.0.3", |
|
| 11 | 12 | "@astrojs/prefetch": "^0.1.1", |
|
| 12 | 13 | "@astrojs/rss": "^2.0.0", |
|
| 13 | 14 | "@vercel/analytics": "^0.1.10", |
|
| 190 | 191 | }, |
|
| 191 | 192 | "engines": { |
|
| 192 | 193 | "node": ">=16.12.0" |
|
| 194 | + | } |
|
| 195 | + | }, |
|
| 196 | + | "node_modules/@astrojs/partytown": { |
|
| 197 | + | "version": "1.0.3", |
|
| 198 | + | "resolved": "https://registry.npmjs.org/@astrojs/partytown/-/partytown-1.0.3.tgz", |
|
| 199 | + | "integrity": "sha512-u2/pG9owRipICz/PksLUUqUat98sm0/YODvv3/IKKJ0JCwF7+0olbMvyyvoj7kJooIXh0XowcOjEs5vhCYFo5g==", |
|
| 200 | + | "dependencies": { |
|
| 201 | + | "@builder.io/partytown": "^0.7.4", |
|
| 202 | + | "mrmime": "^1.0.0" |
|
| 193 | 203 | } |
|
| 194 | 204 | }, |
|
| 195 | 205 | "node_modules/@astrojs/prefetch": { |
|
| 642 | 652 | }, |
|
| 643 | 653 | "engines": { |
|
| 644 | 654 | "node": ">=6.9.0" |
|
| 655 | + | } |
|
| 656 | + | }, |
|
| 657 | + | "node_modules/@builder.io/partytown": { |
|
| 658 | + | "version": "0.7.5", |
|
| 659 | + | "resolved": "https://registry.npmjs.org/@builder.io/partytown/-/partytown-0.7.5.tgz", |
|
| 660 | + | "integrity": "sha512-Zbr2Eo0AQ4yzmQr/36/h+6LKjmdVBB3Q5cGzO6rtlIKB/IOpbQVUZW+XAnhpJmJr9sIF97OZjgbhG9k7Sjn4yw==", |
|
| 661 | + | "bin": { |
|
| 662 | + | "partytown": "bin/partytown.cjs" |
|
| 645 | 663 | } |
|
| 646 | 664 | }, |
|
| 647 | 665 | "node_modules/@csstools/selector-specificity": { |
|
| 7330 | 7348 | "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", |
|
| 7331 | 7349 | "engines": { |
|
| 7332 | 7350 | "node": ">=4" |
|
| 7351 | + | } |
|
| 7352 | + | }, |
|
| 7353 | + | "node_modules/mrmime": { |
|
| 7354 | + | "version": "1.0.1", |
|
| 7355 | + | "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz", |
|
| 7356 | + | "integrity": "sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==", |
|
| 7357 | + | "engines": { |
|
| 7358 | + | "node": ">=10" |
|
| 7333 | 7359 | } |
|
| 7334 | 7360 | }, |
|
| 7335 | 7361 | "node_modules/ms": { |
|
| 45 | 45 | "typescript": "^4.9.4" |
|
| 46 | 46 | }, |
|
| 47 | 47 | "dependencies": { |
|
| 48 | + | "@astrojs/partytown": "^1.0.3", |
|
| 48 | 49 | "@astrojs/prefetch": "^0.1.1", |
|
| 49 | 50 | "@astrojs/rss": "^2.0.0", |
|
| 50 | 51 | "@vercel/analytics": "^0.1.10", |
| 18 | 18 | <html lang={siteConfig.lang}> |
|
| 19 | 19 | <head> |
|
| 20 | 20 | <!-- Google tag (gtag.js) --> |
|
| 21 | - | <script async src="https://www.googletagmanager.com/gtag/js?id=G-QT67QEFLTG"></script> |
|
| 22 | - | <script> |
|
| 21 | + | <script type="text/partytown"src="https://www.googletagmanager.com/gtag/js?id=G-QT67QEFLTG"></script> |
|
| 22 | + | <script type="text/partytown"> |
|
| 23 | 23 | window.dataLayer = window.dataLayer || []; |
|
| 24 | 24 | function gtag() { |
|
| 25 | 25 | dataLayer.push(arguments); |