preactjs / next-plugin-preact

Next.js plugin for preact X
396 stars 9 forks source link

Duplicate <link rel="canonical" /> when use in nextjs #51

Open ekanant opened 2 years ago

ekanant commented 2 years ago

I create a website by using next.js and usenext-plugin-preact for smaller bundle size. I put a <link rel="canonical" key="canonical" href="this is from _app.tsx"/> in _app.tsx and put it again on some specific page <link rel="canonical" key="canonical" href="this is from special page"/> it print out duplicate canonical.

I open an issue to next.js repo but they said it seem to be issue with next-plugin-preact.

I create a repo with duplicate result here https://github.com/ekanant/nextjs-duplicate-in-head.