-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[TypeScript] @mdx-js/rollup doesn't match Vite 3's plugin types #2105
Comments
Why would that be a bug here? This uses Rollup's plugin type. What would you suggest? Why not a bug in Vite? mdx/packages/rollup/lib/index.js Line 4 in 69a15b7
|
Closing due to no response (and per my above comment: I think we’re doing the right thing) |
I hope this would be of help: [vitejs.dev] Rollup Plugin Compatibility Here is the solution: If I am not getting wrong, use
Or in this way: plugins: [
react(),
{
...mdx(),
enforce: 'post',
apply: 'build',
},
// ...
] I am quite a noob, pls excuse me for possible mistakes. p.s. Document here doesn't work, except for being the way above. Thanks for your time. |
If it doesn’t work, that’s because Vite changed. It used to work. |
Sure, I'll try to do it when I wake up tomorrow. 🛏️ To-Do-rrow:
Update:I checked dependencies in WARN Issues with peer dependencies found . └─┬ @mdx-js/rollup 2.1.5 └── ✕ missing peer rollup@>=2 Peer dependencies that should be installed: rollup@>=2 No idea of what that means, I installed rollup by That's the problem. The breaking change was made by |
What that means is that you are using pnpm. Which does not install peer dependencies. It means you need to install it.
This is fine for us, but not fine for Vite. Vite wants a version higher than
Yes. Install a lower version.
Raise it with Vite folks or install v2 for them. Our package supports version 2 and 3. |
Thank you. I've learned something new !! 🌵 |
Initial checklist
Affected packages and versions
@mdx-js/rollup 2.1.2
Link to runnable example
No response
Steps to reproduce
Create a vite.config.ts with:
Expected behavior
TypeScript should not show errors
Actual behavior
TypeScript shows errors:
Runtime
Node v16
Package manager
npm v8
OS
macOS
Build and bundle tools
Vite
The text was updated successfully, but these errors were encountered: