-
Notifications
You must be signed in to change notification settings - Fork 451
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Hello,
I am working on a project using Next.js 15 and aiming to integrate the Google Places API. To improve performance, I want to use Partytown to load the Google Places script in a web worker. However, I am encountering some difficulties and would appreciate guidance or examples on how to implement this setup correctly.
- Next.js Version: 15
- App Router: Enabled with experimental features.
- Partytown Configuration: Installed @builder.io/partytown.
- Configured Partytown in the public folder as per the documentation.
- Google Places API: Trying to load the script via Partytown to offload its execution to a web worker.
Code Snippets in layout.tsx
<Script
src={`https://maps.googleapis.com/maps/api/js?
key=${process.env.NEXT_PUBLIC_GOOGLE_MAPS_API_KEY}&libraries=places`}
type="text/partytown" />
<Partytown debug={true} forward={["google.maps.places"]} />
Reproduction
https://codesandbox.io/p/devbox/6h99fx
Steps to reproduce
You can see how isnt worked on codesandbox
Browser Info
Chrome
Additional Information
No response
MathiasGruber, lovrozagar and welfoz
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working