-
Notifications
You must be signed in to change notification settings - Fork 106
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
[Bug] mdx stories with Chinese name are not showing up in side-menu #389
Comments
@youngboy thanks for reporting this. Does it work correctly if you use the webpack builder? |
I'm stick with vite, haven't try webpack yet 😂. Also, it was working until I upgrade storybook from 6.4.x to 6.5.0 and builder-vite from 0.1.25 to 0.1.34 |
I wasn't asking you to change to webpack, I meant it as a way to troubleshoot whether it is an issue within storybook itself, or the vite builder (this project). :-D. You should just be able to remove the |
Oh, thanks for your time and help. just tried out webpack builder, and it is works fine. |
I think I found the issue causing this. https://github.com/brillout/vite-plugin-mdx/blob/master/src/transform.ts#L39 export name in chinese char is add from https://github.com/storybookjs/mdx1-csf/blob/mdx1-support/src/sb-mdx-plugin.ts#L521 to export each story
Add |
What version of
vite
are you using?2.9.6
System info and storybook versions
Environment Info:
System:
OS: macOS 12.2
CPU: (8) x64 Apple M1 Pro
Binaries:
Node: 16.10.0 - /usr/local/bin/node
Yarn: 3.1.1 - /usr/local/bin/yarn
npm: 7.24.0 - /usr/local/bin/npm
Browsers:
Chrome: 101.0.4951.64
Firefox: 88.0.1
Safari: 15.3
Describe the Bug
write stories in mdx format, if the name contains Chinese string (or non-ascii string ?). it will not showing up properly.
reproduce steps:
clone this repo, add file
examples/vue/stories/abc.stories.mdx
with following contentyarn example:vue
Example/Utf
not showing as expected测试
totest
Example/Utf
is showing nowLink to Minimal Reproducible Example
No response
Participation
after some investigation, I found out the story name occur in https://github.com/storybookjs/builder-vite/blob/main/packages/builder-vite/inject-export-order-plugin.ts#L24 is not equal to https://github.com/storybookjs/storybook/blob/56b5552da077f48bf653b2a115f21d38e95ccf2e/lib/client-api/src/StoryStoreFacade.ts#L177
The text was updated successfully, but these errors were encountered: