nuxt-modules / plausible

🎟️ Plausible Analytics integration for Nuxt
https://plausible.io
MIT License
102 stars 5 forks source link

feat: move to fork of `plausible-analytics` #15

Closed Barbapapazes closed 5 months ago

Barbapapazes commented 5 months ago

Hello,

I move this module to a fork of plausible-tracker to take back control of development. If I do correctly my job, there is no breaking change.

fix #5

Barbapapazes commented 5 months ago

For the next major version, we could simplify options.

johannschopplich commented 5 months ago

Lovely! Will take a deeper look into it later. Thanks in advance. 🙂

Barbapapazes commented 5 months ago

Maybe we should update the compatibility to 3.10 since I use the dependsOn for plugins (https://github.com/nuxt/nuxt/pull/25409)

johannschopplich commented 5 months ago

As much as I like dependsOn, I don't think this breaking change is worth it. I know a handful of clients who haven't upgraded to newer Nuxt versions yet. I would much prefer providing users with your Plausible tracker fork than requiring them to upgrade to the latest Nuxt version as well. What do you think?

Can't we just use one plugin file and await import the functions, which are a separate plugin at the moment? Is the build chunk worth it?

Maybe migrate to dependsOn usage when it got more mainstream...

Having said that, maybe enforcing Nuxt 3.10 is OK. I haven't made up my mind yet. 😄 Your plugin split is much appreciated tho.

Barbapapazes commented 5 months ago

As much as I like dependsOn, I don't think this breaking change is worth it. I know a handful of clients who haven't upgraded to newer Nuxt versions yet. I would much prefer providing users with your Plausible tracker fork than requiring them to upgrade to the latest Nuxt version as well. What do you think?

Can't we just use one plugin file and await import the functions, which are a separate plugin at the moment? Is the build chunk worth it?

Maybe migrate to dependsOn usage when it got more mainstream...

Having said that, maybe enforcing Nuxt 3.10 is OK. I haven't made up my mind yet. 😄 Your plugin split is much appreciated tho.

Will investigate but maybe, the dependsOn is useful when you depend on plugins from another module. Since it's an array, the order may be sufficient to initialize extensions after the main one.

Barbapapazes commented 5 months ago

As written here, https://nuxt.com/docs/guide/directory-structure/plugins#using-composables, plugins are called sequentially. This means we have just to order them!

No more breaking change @johannschopplich and I revert nuxt update.

johannschopplich commented 5 months ago

Great job, thanks a lot!

Note: As far as I understand it, we can upgrade Nuxt, but if we would have to tighten compatibility, we would have to define it in the module meta:

compatibility: {
  nuxt: '^3',
},