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

Sort loaded SVGs for deterministic output #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mhassan1
Copy link

In the case of many SVGs in a project, the order in which they are completely processed is non-deterministic. This results in a sprites.svg that changes from build to build. In the case of Yarn v2 (when referencing a Git project that is built using this plugin), this breaks the expectation that the expected checksum of the project tarball will not change from one environment to another.

This PR sorts the array of symbols before emitting them to sprites.svg. I have confirmed that repeated builds with this change keep the same checksum.

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