andrezimpel / gatsby-plugin-gdpr-cookies

Gatsby plugin to add Google Analytics (V4 is supported), Google Tag Manager, Facebook Pixel, TikTok Pixel and Hotjar in a GDPR form to your site.
Apache License 2.0
101 stars 70 forks source link

support gatsby v3 #39

Closed gijsbotje closed 3 years ago

gijsbotje commented 3 years ago

hi there,

Just so it is noted, you might already be working on it, but the current version of this plugin is marked as incompatible with gatsby v3. So supporting v3 would be great :).

andrezimpel commented 3 years ago

Dumb question, but how would you ensure it’s working in v2 & v3 packaging wise?

Im also working on a rewrite of the plugin (no breaking changes).

gijsbotje commented 3 years ago

@andrezimpel I'm far from capable of answering that question :D i use the plugin and would like to upgrade to gatsby v3. The rewrite sounds interesting and might be the time to go further with v3 and drop v2.

its also possible you won't need to change anything and just need to add a peer dependency voor 3.0.0. At https://www.gatsbyjs.com/docs/reference/release-notes/migrating-from-v2-to-v3/#for-plugin-maintainers you can see what has changed. If nothing has changed you could add it as peer dependency "gatsby": "^2.24.77 || ^3.0.0". Unsure if that actually works to avoid the warning but is valid to my knowledge.

andrezimpel commented 3 years ago

@gijsbotje Ah cool. Thanks for link. I will have a look at this and update the plugin accordingly. I will let you know when it's published to npm. (gonna have a look at this now)

gijsbotje commented 3 years ago

@andrezimpel Great! kudos for the fast responses!

andrezimpel commented 3 years ago

Just released 1.0.13 with v3 support!

gijsbotje commented 3 years ago

awesome! thanks @andrezimpel

LiverpoolOwen commented 3 years ago

Just released 1.0.13 with v3 support!

Looks like there is a peer dependancy on React 16 but Gatsby v3 uses react 17 right? @andrezimpel

andrezimpel commented 3 years ago

Snap, you are right. Just published 1.0.14 with react 17 support. I removed react completely yesterday vor v2.