docusaurus-plugin-image-zoom icon indicating copy to clipboard operation
docusaurus-plugin-image-zoom copied to clipboard

Add support for docusaurus v3

Open fartbagxp opened this issue 1 year ago • 4 comments

This is a simple enhancement request to support Docusaurus V3, which the beta recently dropped.

fartbagxp avatar Oct 12 '23 04:10 fartbagxp

@fartbagxp Probably the best thing to do for now if you want the functionality without a bunch of hassle:

npm install docusaurus-plugin-image-zoom --legacy-peer-deps

This effectively ignores peer dependencies entirely (another good explanation goes into more details), which is usually not a good practice, but if you look at the code for this plugin and its package-lock.json file, it seems like ignoring the peer dependencies is fine for right now (at least until the requested enhancement is added).

farlowdw avatar Oct 17 '23 22:10 farlowdw

Ah, it may be better to be deliberate with ignoring the peer dependency with a manual override.

I added this block of code to override the themes-classic dependency.

  "overrides": {
    "docusaurus-plugin-image-zoom": {
      "@docusaurus/theme-classic": "^3.0.0"
    }
  },

Additionally, I deleted my package-lock.json and my node_modules, and re-ran npm install. The zoom feature works with Docusaurus 3.0.0.

fartbagxp avatar Nov 02 '23 02:11 fartbagxp

I'm not sure if it's related or not but I get this issue #25 with Docusaurus 3.4. @fartbagxp Solution didn't work for me.

danvy avatar Aug 06 '24 13:08 danvy

I'm not sure if it's related or not but I get this issue #25 with Docusaurus 3.4. @fartbagxp Solution didn't work for me.

Try 3.5.2 - there's been a number of fixes going in.

fartbagxp avatar Aug 13 '24 16:08 fartbagxp