Skip to content

Commit

Permalink
lets test partytown
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-barzilay committed Oct 23, 2023
1 parent 844e6a0 commit 8494403
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ import prefetch from "@astrojs/prefetch";
import sitemap from "@astrojs/sitemap";
import robotsTxt from "astro-robots-txt";

import partytown from "@astrojs/partytown";

// https://astro.build/config
export default defineConfig({
integrations: [tailwind(), astroI18next(), prefetch(), sitemap(), robotsTxt()],
integrations: [tailwind(), astroI18next(), prefetch(), sitemap(), robotsTxt(), partytown()],
site: 'https://nabisaydoun.org/'
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/partytown": "^2.0.1",
"@astrojs/prefetch": "^0.4.0",
"@astrojs/sitemap": "^3.0.0",
"@astrojs/tailwind": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Map.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import SvgCemetery from "./SvgCemetery.astro";
import { t, changeLanguage } from "i18next";
---

<script>
<script type="text/partytown">
import { set_panzoom } from "../js/panzoom.js";
set_panzoom();
document.addEventListener("astro:page-load", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Table.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const lang = i18next.language;
<!-- Store the lang value as a data attribute. -->
<astro-language id="lang" data-lang={lang}></astro-language>

<script>
<script type="text/partytown">
import { create_table } from "../js/table.js";
create_table();
document.addEventListener("astro:page-load", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tooltip.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
---

<script>
<script type="text/partytown">
import { create_tooltips } from "../js/tooltips.js";
create_tooltips();
document.addEventListener("astro:page-load", async () => {
Expand Down

0 comments on commit 8494403

Please sign in to comment.