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: relative import of . & .. parsing error #2191

Merged
merged 3 commits into from
Aug 29, 2024

Conversation

wzc520pyfm
Copy link
Contributor

🤔 这个变动的性质是?/ 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

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

Minimal Reproduction / 最小复现:

https://github.com/wzc520pyfm/dumi-relative-path-test

Using the relative path .. in the demo will result in a parsing error:
demo中使用相对路径..会解析错误:

However, this works fine in 2.4.7.
然后,它在2.4.7中是正常工作的。

import Foo from '..'
image

Solution / 解决方式:

.. should be recognized as a relative path.
.. 应该被识别为相对路径。

📝 更新日志 / Changelog

Language Changelog
🇺🇸 English fix relative path (..) parsing error
🇨🇳 Chinese 修复相对路径..解析错误

Copy link

vercel bot commented Aug 27, 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 Aug 28, 2024 2:06pm

@Jinbao1001 Jinbao1001 changed the title fix(loaders): fix relative path (..) parsing error fix: relative import of . & .. parsing error Aug 29, 2024
@Jinbao1001 Jinbao1001 merged commit 2559335 into umijs:master Aug 29, 2024
3 checks passed
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.

2 participants