fddigital-uk / sanity-plugin-visual-options

19 stars 7 forks source link

Rework plugin to use @sanity/pkg-utils tooling #22

Closed jwarby closed 8 months ago

jwarby commented 9 months ago

Hi, my colleague opened https://github.com/fddigital-uk/sanity-plugin-visual-options/issues/21 recently, and I spent some time looking into it. I eventually managed to resolve the issue by bootstrapping a new plugin using Sanity's official tooling, and then just copying over the actual meat from the original plugin into it. I think it's working as intended but I'll confess I don't really have much experience with either this plugin or Sanity itself. I realise this PR has quite a lot of change in it and can understand if you are hesitant to merge, but thought I would open it anyway in the hope that we can eventually merge together as we'd prefer not to maintain our own fork of the plugin :upside_down_face: thanks!

Fixes #21

nicktaylor commented 9 months ago

Thanks @jwarby! I'll take a more detailed look this week. Appreciate the PR. Fingers crossed it'll fix this and one other issue that's outstanding regarding NextJS which also is a strange edge case that only occurs with the prebuilt JS.

jwarby commented 9 months ago

Thanks @nicktaylor!

I should have also mentioned - the issue my colleague raised - we were able to reproduce in a freshly bootstrapped Sanity Studio project (pnpm create sanity@latest) and then adding the plugin (and without even adding it to a schema or anything).

nicktaylor commented 9 months ago

Perfect, thanks for the additional info @jwarby, that's super helpful!