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: order multiple inputs correctly #462

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kylemellander
Copy link

@kylemellander kylemellander commented Oct 1, 2024

See the issue here: #461.

Summary of the problem

When using multiple inputs in rollup, css output from any non-first inputs that do not exist in the first input are placed at the top of the output and are ordered by resolve order, causing css output for multiple inputs to be non-deterministic.

Summary of the fix

In order to fix this problem, we need to trace all the places in which we are importing css and sort based on all those sources. I needed to expand some of the functions to allow for multiple entry paths, but was able to keep the seen checking to prevent multiple checks of shared files.

Tests were added to demonstrate that the fix works.

The function to properly order imported css was ignoring
any ordering for any file that was not the first import.  This would
cause imports from any subsequent imports to go first and in processed
order, which can create inconsistencies in how css renders.
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.

1 participant