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: some project can't resolve animation.scss with pnpm, lost animat… #1704

Merged
merged 1 commit into from Jul 14, 2023

Conversation

pointhalo
Copy link
Collaborator

@pointhalo pointhalo commented Jul 14, 2023

中文模板 / Chinese Template

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Test Case
  • TypeScript definition update
  • Document improve
  • CI/CD improve
  • Branch sync
  • Other, please describe:

PR description

原 animation.scss 与 local.scss 的判断方式不同,animation.scss 用的是 require.resolve,local.scss 用的是 webpack 提供的 enhanced-resolve 的resolve.sync (this.context, xxx)

经测试,在用户配置了主题时,在某些极特殊情况下(但并非所有pnpm项目),前者无法正确检测到包中是否存在 animation.scss 文件(oncall - 4686194),从而导致animation相关的 css variable 丢失,动画无法正常执行。 Tooltip、Popover等图层可能无法被正确隐藏卸载。

image
image

Changelog

🇨🇳 Chinese

  • Fix: Semi Webpack Plugin 修改 theme loader 引用 animation.scss 相关的逻辑,对 pnpm 场景下某些特殊目录组织兼容

🇺🇸 English

  • Fix: Semi Webpack Plugin modifies the logic related to animation.scss referenced by theme loader, which is compatible with some special directory organizations in pnpm scenarios

Checklist

  • Test or no need
  • Document or no need
  • Changelog or no need

Other

  • Skip Changelog

Additional information

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a3ce70e:

Sandbox Source
pr-story Configuration
Semi Design: Simple Story Configuration

@DaiQiangReal DaiQiangReal merged commit ae9420f into main Jul 14, 2023
8 of 9 checks passed
@DaiQiangReal DaiQiangReal deleted the fix-animationLost branch July 14, 2023 08:12
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