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

Reduce browser console warnings of preloaded, but unused Javascript #4252

Merged
merged 7 commits into from
Jan 17, 2025

Conversation

veganstraightedge
Copy link
Contributor

@veganstraightedge veganstraightedge commented Jan 17, 2025

  • added preload: false to all pinned Javascripts in importmap.rb
  • added Javascript to only the page/s where its needed by using content_for :head
  • moved importmap and javascript_import_module tags into a yield :javascript which only gets render if content_for? :javascript
  • removed Bootstrap JS everywhere except /admin layout
    • with a plan for how to remove it there too, because it's only used to make the nav responsive hamburger icon

@veganstraightedge veganstraightedge marked this pull request as ready for review January 17, 2025 08:40
@veganstraightedge veganstraightedge merged commit 7dd19a4 into main Jan 17, 2025
9 checks passed
@veganstraightedge veganstraightedge deleted the less_js branch January 17, 2025 08:40
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