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: 修复sass/less-loader的路径解析 #1771

Merged
merged 13 commits into from
Mar 11, 2025

Conversation

YufJi
Copy link
Contributor

@YufJi YufJi commented Feb 26, 2025

close #1767

接入loader-runner层,可直接运行sass/less-loader

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC.
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests and other checks with just ready

Edits

  • Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.

Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.04%. Comparing base (54719e0) to head (2366581).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1771   +/-   ##
=======================================
  Coverage   53.04%   53.04%           
=======================================
  Files         190      190           
  Lines       18974    18974           
=======================================
  Hits        10065    10065           
  Misses       8909     8909           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

.catch((err: any) => {
throw new Error(err.toString());
});
return { content: result.css, type: 'css' };
}

export { render };

function getResolver(compileStringAsync: any) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看上去是把 sass-loader 做的事又做了一遍,不知道有没有更好的解法,比如:

  1. 直接依赖 sass-loader 设法复用相关逻辑
  2. 搞个适配层直接用 sass-loader
  3. ……

cc @xusd320 @sorrycc @Jinbao1001

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@YufJi YufJi changed the title fix: 修复sass-loader的路径解析 fix: 修复sass/less-loader的路径解析 Feb 26, 2025
@YufJi YufJi requested review from xusd320 and PeachScript March 10, 2025 12:16
@xusd320 xusd320 merged commit 2ce7d6a into umijs:master Mar 11, 2025
23 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.

Error: Can't find stylesheet to import. Mako build failed with sass used "@import '~xxx/variables.scss';"
3 participants