Fix issues with javascript not loading#147
Merged
hackall360 merged 2 commits intomainfrom Nov 22, 2025
Merged
Conversation
The recent Vite build pipeline implementation (commits b83be35, cecd1b8) broke the site because HTML files were still referencing manually minified assets that no longer exist in the deployment. **Root Cause:** - HTML files referenced `script.min.js?v=97d7e8e` and `styles.min.css?v=97d7e8e` - Vite build pipeline expects source file references (`script.js`, `styles.css`) - Vite bundles CSS automatically with content hashes (e.g., `assets/styles-[hash].css`) - Non-module scripts are not bundled by Vite but need to be copied to dist/ - Result: 404 errors because minified files don't exist in deployed dist/ **Changes Made:** 1. **Updated all HTML files** (index.html, about/, contact/, projects/, services/): - Changed `styles.min.css?v=97d7e8e` → `styles.css` - Changed `script.min.js?v=97d7e8e` → `script.js` - Removed manual cache-busting query params (Vite handles this) 2. **Updated copy-assets.js**: - Added `script.js` to the assets copy list - Ensures main JavaScript file is copied to dist/ after Vite build **How it works now:** - Vite processes HTML files and discovers asset references - CSS: Vite bundles `styles.css` → `assets/styles-[hash].css` (automatic) - JS: Non-module scripts copied manually via copy-assets.js - Cache-busting: Handled by Vite content hashes + cache-bust.js meta tags - Result: All assets load correctly from dist/ deployment **Testing:** - ✅ Build completes successfully - ✅ script.js copied to dist/ - ✅ Vite-bundled CSS injected into HTML - ✅ All 8 HTML pages processed This fix aligns the HTML references with the new Vite build pipeline, resolving the script loading failures and restoring site functionality.
…ues-01Xs6sC3aT9Zyq6vSQL7LjGj Fix site display issues from recent changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.