mdx-js / mdx

Markdown for the component era

Home Page:https://mdxjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`@mdx-js/rollup` stops working on Vite v5

JounQin opened this issue · comments

Initial checklist

Affected packages and versions

@mdx-js/rollup

Link to runnable example

https://github.com/un-ts/mono-lib-boilerplate

Steps to reproduce

yarn
yarn dev

Expected behavior

Render page correctly

Actual behavior

image

Runtime

Node v18

Package manager

yarn v4

OS

macOS

Build and bundle tools

Vite

@JounQin sorry you ran into a spot of trouble.
Could you produce a minimal reproducible example?

It works in my testing https://stackblitz.com/edit/vitejs-vite-4txvc5?file=package.json

@JounQin have you tried reducing the issue? Or using an official release of vite instead of a patched version?
I'm at a conference right now, but if you're stuck I may be able to help you debug your personal project later.

@ChristianMurphy The reproduction is tiny.

image

The patch is also tiny for vitejs/vite#15281

image

I do cannot reproduce on stackblitz: https://stackblitz.com/edit/vitejs-vite-mt6zzg?file=vite.config.ts,src%2Fmain.tsx

I'm still trying to add react-router-dom.

Which repo do you mean? I see a link to https://github.com/un-ts/mono-lib-boilerplate which is giant?

From the Vite issue and your patch, it seems a Vite bug?

Which repo do you mean? I see a link to un-ts/mono-lib-boilerplate which is giant?

The vite part is only docs folder. Maybe really a Vite bug which does not support nested folder anymore, I'll find out later.

I really can't find out what is going on... I changed almost everything on stackblitz just like my mono-lib-boilerplate, but it just works differently...

@ChristianMurphy If you can help to debug when you're free that would be very appreciated.

@JounQin have you tried installing via npm instead of yarn?
My next thought is that resolutions and how the folders are laid out are different between the two.

@JounQin have you tried installing via npm instead of yarn? My next thought is that resolutions and how the folders are laid out are different between the two.

Just tried, it didn't help.

@JounQin I see some more changes landed in un-ts/mono-lib-boilerplate are you still having a vite issue? or has it been resolved?

Thanks for still remembering this issue, it is indeed an issue from Vite itself.