next.js
8d6f8324 - Re-add Partytown custom configuration to `Script` component documentation (#68946)

Commit
1 year ago
Re-add Partytown custom configuration to `Script` component documentation (#68946) ### What? Add documentation about Partytown configuration on the `Script` documentation page. ### Why? The [`Script`](https://nextjs.org/docs/pages/building-your-application/optimizing/scripts) component with the `strategy` prop set to `worker` uses [Partytown](https://partytown.builder.io/) under the hood. Users may need to customize [Partytown options](https://partytown.builder.io/configuration) such as `forward`, `loadScriptsOnMainThread`, and `resolveUrl`, to allow for third party scripts such as Segment and Google Tag Manager to work properly. This used to be documented on `docs/basic-features/script.md`, as you can see on the [pull request that originally introduced the `worker` strategy](https://github.com/vercel/next.js/pull/34244/files#diff-62dbdb4bc703f7997ea259ad68d8e823d9fafed1e9571155e01c4de21abb6b47R165-R197), but this doc page was removed (potentially unintendedly) on https://github.com/vercel/next.js/pull/50701, and there's no longer mention of Partytown configuration in Next.js docs. ### How? Adding back the documentation text originally written by @housseindjirdeh in his pull request https://github.com/vercel/next.js/pull/34244 Fixes https://github.com/vercel/next.js/issues/68943 --------- Co-authored-by: samcx <sam@vercel.com>
Author
Parents
Loading