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

fix: workaround for resolve esm package in code block demo #2082

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

Jinbao1001
Copy link
Member

@Jinbao1001 Jinbao1001 commented Apr 26, 2024

🤔 这个变动的性质是?/ What is the nature of this change?

  • 新特性提交 / New feature
  • bug 修复 / Fix bug
  • 样式优化 / Style optimization
  • 代码风格优化 / Code style optimization
  • 性能优化 / Performance optimization
  • 构建优化 / Build optimization
  • 网站、文档、Demo 改进 / Website, documentation, demo improvements
  • 重构代码或样式 / Refactor code or style
  • 测试相关 / Test related
  • 其他 / Other

🔗 相关 Issue / Related Issue

#2078

💡 需求背景和解决方案 / Background or solution

dumi 会把 Markdown 代码块 demo 中的 import 转成 require,但 Webpack 在解析 esm 和 cjs 模块时的 conditionNames 是不同的,这会导致有些依赖的解析出现问题(比如 element-plus/es/xxxx),所以暂时先全局加上 import 的 condition,后续再做彻底解

📝 更新日志 / Changelog

Language Changelog
🇺🇸 English fix: support require for mjs packages
🇨🇳 Chinese 支持 require mjs

Copy link

vercel bot commented Apr 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dumi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 26, 2024 6:55am

@PeachScript PeachScript changed the title fix: support require for mjs packages fix: workaround for resolve esm package in code block demo Apr 26, 2024
@PeachScript PeachScript merged commit 62662ea into master Apr 26, 2024
10 checks passed
@PeachScript PeachScript deleted the Jinbao/fix-02 branch April 26, 2024 07:01
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

Successfully merging this pull request may close these issues.

None yet

2 participants