4lejandrito / next-plausible

Simple integration for https://nextjs.org and https://plausible.io analytics
https://next-plausible.vercel.app
MIT License
603 stars 33 forks source link

Script usage warning when migrating to next@12.1 #36

Closed devrsi0n closed 2 years ago

devrsi0n commented 2 years ago

When I migrate chirpy to next@12.1, there is a warning about script usage with next-plausible.

image image
devrsi0n commented 2 years ago

It looks like we did use <script> in head. Can we use next/script as the doc suggested?

4lejandrito commented 2 years ago

Hi @devrsi0n,

I noticed this morning and fixed it in https://github.com/4lejandrito/next-plausible/pull/35. The problem is that there is a bug in nextjs (https://github.com/vercel/next.js/issues/33686) that breaks the expected behaviour, so I cannot merge it.

devrsi0n commented 2 years ago

@4lejandrito Thanks for the quick response, let's hold it until next.js fixes it.

4lejandrito commented 2 years ago

In the meantime I've published next-plausible@3.1.5 with https://github.com/4lejandrito/next-plausible/commit/db666f59ab01100d4d1d99e082fabc05c3303267 to at least avoid the warning when running next dev.

devrsi0n commented 2 years ago

Thanks, that's helpful!