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: simplify the transformIndexHtml utility function #1147

Merged
merged 3 commits into from
Nov 26, 2020

Conversation

victornpb
Copy link
Contributor

@victornpb victornpb commented Nov 26, 2020

The original function was very oddly written IMHO, I had to long stare at this code trying make sense of it, until I figured what it was supposed to do. So I tried to make it very straightforward and make the intent more clear.

@victornpb victornpb changed the title Fix bug when post html transform is never called Improve readability of function Nov 26, 2020
@victornpb
Copy link
Contributor Author

Edit: There is no bug here, but I still think the original code is quite confusing, I hope I made it better without having to make it longer.

@aleclarson aleclarson changed the title Improve readability of function refactor: simplify the transformIndexHtml utility function Nov 26, 2020
@aleclarson aleclarson merged commit 6ea0e85 into vitejs:master Nov 26, 2020
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.

2 participants