Open alexmardanovgenesis opened 2 years ago
The same here!
If you pin next to v12.2.2, does that fix the issue?
@charkour I've just checked different versions of next and partytown - same behaviour.
"@builder.io/partytown": "0.6.2",
"next": "12.2.2",
"@builder.io/partytown": "0.6.4",
"next": "12.2.2",
"@builder.io/partytown": "0.6.2",
"next": "12.2.4",
"@builder.io/partytown": "0.6.4",
"next": "12.2.4",
It works in iOS 11.4 but doesn't in 11.2 and lower versions.
Sorry to hear that, thanks for the info!
Are you able to debug which API is crashing in 11.2? If it's simple enough change we could update it, however, if it's going to be a large refactor it'd probably be best to state on the website Partytown doesn't work on iOS 11.2 and lower. Looking at July 2022 stats, it looks like even iOS 14.6 has a global market share of 1.25%. Would you be able to find the API that crashes and submit fixing it? Thanks
Describe the bug It looks like all hydration step is missed in iOS less then v11.4. It might be an issue with service worker support. No interactivity on the pages. No errors in console, except in iOS v10:
SyntaxError: Unexpected token '...'. Expected a property name.
I suppose, if not supported, it should replace
type="text/partytown"
withtype="text/javascript"
, but it is done in sw file, so that script will not be ever executed in old iOS.To Reproduce Steps to reproduce the behavior:
npx create-next-app@latest
npm install @builder.io/partytown
. Copy lib files in a public folder.page/index.js
:export default function Home() { const [clicked, setClicked] = useState(false);
return ( <>
); }
npm run build
andnpm run start
. Open iPhone 7 with iOS v10 in browserstack.Reproduction link https://stackblitz.com/edit/nextjs-wmygke Browserstack doesn't work with stackblitz. But you could download source, install, build, run app locally, then check on browserstack.
Expected behavior It should change state on button click in at least iOS v10 changing label. Also
test.js loaded
should be in the console.Partytown version