Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
stafyniaksacha opened this issue Mar 28, 2024 · 2 comments

Comments

@stafyniaksacha
Copy link

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

mdc/src/module.ts

Lines 170 to 180 in 0c8167c

const include = [
'remark-gfm', // from runtime/parser/index.ts
'remark-emoji', // from runtime/parser/index.ts
'remark-mdc', // from runtime/parser/index.ts
'remark-rehype', // from runtime/parser/index.ts
'rehype-raw', // from runtime/parser/index.ts
'parse5', // transitive deps of rehype
'unist-util-visit', // from runtime/highlighter/rehype.ts
'unified', // deps by all the plugins
'debug', // deps by many libraries but it's not an ESM
]

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

@Sun-ZhenXing
Copy link

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
Copy link

savaf commented Apr 7, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants