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

refactor(css): use preliminaryFileName to detect pure CSS chunks #13974

Merged

Conversation

sapphi-red
Copy link
Member

Description

A better way to handle the non finalized filenames (!~{001}~).
I came up with this while thinking about #11671 (comment)

related: rollup/rollup#5080

Additional context


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 PR Title 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 added p1-chore Doesn't change code behavior (priority) on hold labels Jul 28, 2023
@stackblitz
Copy link

stackblitz bot commented Jul 28, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@sapphi-red sapphi-red mentioned this pull request Jul 28, 2023
9 tasks
bluwy
bluwy previously approved these changes Jul 29, 2023
Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

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

Looks great! I think I initially didn't went with it because I wasn't sure if RenderedChunk and bundled chunk are sharing the same instance, but it looks like it does so great to use that instead until Rollup also supports the new prop.

@sapphi-red
Copy link
Member Author

Changed to use preliminaryFileName instead of viteNonFinalizedFilename.

@sapphi-red sapphi-red changed the title refactor(css): inject viteNonFinalizedFilename to detect pure CSS chunks refactor(css): use preliminaryFileName to detect pure CSS chunks Aug 10, 2023
@patak-dev patak-dev merged commit 835249d into vitejs:main Aug 10, 2023
13 checks passed
@sapphi-red sapphi-red deleted the refactor/vite-non-finalized-filename branch August 10, 2023 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p1-chore Doesn't change code behavior (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants