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

Reverse order of styles & scripts #1055

Merged
merged 12 commits into from
Feb 21, 2025
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Bjorn Lu <[email protected]>
TheOtterlord and bluwy authored Jan 10, 2025
commit c30e5fd92ef7d2b49abeddd75a9deabab2fe4a2c
4 changes: 2 additions & 2 deletions internal/transform/transform.go
Original file line number Diff line number Diff line change
@@ -125,7 +125,7 @@ func ExtractStyles(doc *astro.Node) {
if !IsHoistable(n) {
return
}
// prepend node to maintain authored order
// append node to maintain authored order
doc.Styles = append(doc.Styles, n)
}
})
@@ -434,7 +434,7 @@ func ExtractScript(doc *astro.Node, n *astro.Node, opts *TransformOptions, h *ha
}
}

// prepend node to maintain authored order
// append node to maintain authored order
if shouldAdd {
doc.Scripts = append(doc.Scripts, n)
n.HandledScript = true
Loading