Skip to content

Commit 9c5dea9

Browse files
committed
Use slim Posthog & updated Phosphor to shrink bundle
1 parent 81edd6f commit 9c5dea9

9 files changed

Lines changed: 422 additions & 32 deletions

File tree

next.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ const nextConfig = {
3939
],
4040
});
4141

42+
// Use PostHog slim bundle (strips toolbar, session recording, surveys, etc.)
43+
config.resolve.alias['posthog-js$'] = require.resolve('posthog-js/dist/module.slim');
44+
4245
return config;
4346
},
4447
};

package-lock.json

Lines changed: 411 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@httptoolkit/util": "^0.1.5",
3131
"@linaria/core": "^7.0.0",
3232
"@linaria/react": "^7.0.1",
33-
"@phosphor-icons/react": "^2.1.4",
33+
"@phosphor-icons/react": "^2.1.10",
3434
"@radix-ui/react-accordion": "^1.1.2",
3535
"@radix-ui/react-dropdown-menu": "^2.0.6",
3636
"@radix-ui/react-tooltip": "^1.0.7",
@@ -50,7 +50,7 @@
5050
"next-sitemap": "^4.2.3",
5151
"next-themes": "^0.2.1",
5252
"next-with-linaria": "^1.3.0",
53-
"posthog-js": "^1.188.1",
53+
"posthog-js": "^1.359.1",
5454
"prismjs": "^1.27.0",
5555
"react": "^18.2.0",
5656
"react-countup": "^6.5.0",

src/components/common-sections/testimonials/components/testimonials-card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const TestimonialsCard = ({
2828

2929
return (
3030
<StyledTestimonialCard cite={sourceLink}>
31-
<StyledQuote dangerouslySetInnerHTML={{ __html: marked.parse(quote, { renderer }) }} />
31+
<StyledQuote dangerouslySetInnerHTML={{ __html: marked.parse(quote, { renderer }) as string }} />
3232
<StyledAuthorWrapper>
3333
<IconAvatar icon={type} />
3434
<StyledAuthorDetails>

src/components/modules/accordion/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ export const Accordion = ({ items, variant = 'default', isBiggerIcon }: Accordio
194194
<StyledAccordionContent>
195195
<div
196196
className="accordion_content_inner"
197-
dangerouslySetInnerHTML={{ __html: marked.parse(item.text, { renderer }) }}
197+
dangerouslySetInnerHTML={{ __html: marked.parse(item.text, { renderer }) as string }}
198198
/>
199199
</StyledAccordionContent>
200200
</StyledAccordionItem>

src/components/modules/fluid-card/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export const FluidCard = ({ title, icon, text, buttonHref, buttonText, variant =
107107
</Heading>
108108
<StyledFluidCardText
109109
data-variant={variant}
110-
dangerouslySetInnerHTML={{ __html: marked.parse(text, { renderer }) }}
110+
dangerouslySetInnerHTML={{ __html: marked.parse(text, { renderer }) as string }}
111111
/>
112112
</StyledFluidCardContentWrapper>
113113
{buttonText && buttonHref && (

src/components/sections/hero-points/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const HeroPoints = ({ title, text }: HeroPointsProps) => {
4848
<Heading fontSize="l" color="textGradient">
4949
{title}
5050
</Heading>
51-
<StyledHeroPointsContent dangerouslySetInnerHTML={{ __html: marked.parse(text) }} />
51+
<StyledHeroPointsContent dangerouslySetInnerHTML={{ __html: marked.parse(text) as string }} />
5252
</Container>
5353
</StyledHeroPointsWrapper>
5454
);

src/components/sections/pricing/plans/components/card/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ const FeatureList = ({ feature, isHighlighted }: FeatureListProps) => {
173173
style={{ '--item-color': textColors[itemColor as keyof typeof textColors] } as React.CSSProperties}
174174
>
175175
<CheckIcon />
176-
<span dangerouslySetInnerHTML={{ __html: marked.parse(item, { renderer }) }} />
176+
<span dangerouslySetInnerHTML={{ __html: marked.parse(item, { renderer }) as string }} />
177177
</StyledPriceCardFeatureItemLI>
178178
))}
179179
</StyledPriceCardFeatureItemsWrapper>

src/components/sections/text-slot/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export const TextSlot = ({ title, copy, texts, children, buttons, textCenteredOn
121121
texts.map(text => (
122122
<StyledTextSlotText
123123
data-text-centered={textCenteredOnMobile ? 'true' : undefined}
124-
dangerouslySetInnerHTML={{ __html: marked.parse(text) }}
124+
dangerouslySetInnerHTML={{ __html: marked.parse(text) as string }}
125125
/>
126126
))}
127127
<StyledTextSlotButtonsWrapper>

0 commit comments

Comments
 (0)