nuxt-modules / mdc

MDC supercharges regular Markdown to write documents interacting deeply with any Vue component.
MIT License
200 stars 22 forks source link

Without shamefully-hoist, it fails to resolve dependency present in 'optimizeDeps.include' #174

Open stafyniaksacha opened 7 months ago

stafyniaksacha commented 7 months ago

When using nuxt content inside a project with pnpm without shamefully-hoist option, vite warnings are show about failing to optimize deps

Do those libraries need to be installed too?

image

https://github.com/nuxt-modules/mdc/blob/0c8167c886f805547aa9a51a5492294f0245d0e2/src/module.ts#L170-L180

repro: https://stackblitz.com/edit/nuxt-starter-q2mm6x?file=.npmrc,package.json

Sun-ZhenXing commented 7 months ago

Same problem. And after installing all the above dependencies the problem disappeared.

image
pnpm add -D debug parse5 rehype-raw remark-emoji remark-gfm remark-mdc remark-rehype unified unist-util-visit
savaf commented 7 months ago

same problem here and @Sun-ZhenXing "solution" works