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): reorder sass importers #10101

Merged
merged 1 commit into from Sep 22, 2022

Conversation

Chen-jj
Copy link
Contributor

@Chen-jj Chen-jj commented Sep 13, 2022

Description

Currently, the orders of sass's importer options is: [internalImporter, customImporter].

When we import a virtual sass dep like the test case add by #3180, everything is fine.Because internalImporter can't resolved it and then customImporter can handle it.

However, if we import a style file with custom extname like @import './common.wxss';.The internalImporter will resolved it thus there is no chances for customImporter to handle it.

So, we should unshift the customImporters, not push.

Additional context

Test case is added.

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@sapphi-red sapphi-red linked an issue Sep 18, 2022 that may be closed by this pull request
4 tasks
@sapphi-red sapphi-red added the p3-minor-bug An edge case that only affects very specific usage (priority) label Sep 19, 2022
Copy link
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

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

Thanks!

@patak-dev patak-dev added this to the 3.2 milestone Sep 22, 2022
@patak-dev patak-dev merged commit a543731 into vitejs:main Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: css p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow CSS preProcessors importers to run before the internal importer
3 participants