Conversation
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://icy-tree-070bd9f0f-6.eastus2.3.azurestaticapps.net |
There was a problem hiding this comment.
Pull request overview
This PR simplifies Font Awesome integration by removing the React component library approach in favor of direct CDN kit loading, which reduces bundle size from ~250KB to ~11MB back down significantly. It also implements client-side caching for static assets to reduce server requests.
Changes:
- Replaced Font Awesome React components with plain
<i>elements using Font Awesome CSS classes - Added Font Awesome kit script to HTML head for CDN-based loading
- Implemented 1-year cache policy for CSS and JS assets in Azure Static Web Apps configuration
- Removed
@fortawesome/react-fontawesomedependency
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| staticwebapp.config.json | Adds caching headers (1-year max-age, immutable) for CSS and JS assets |
| index.html | Adds Font Awesome kit CDN script to document head |
| src/components/LocationResults.tsx | Replaces FontAwesomeIcon components with <i> elements and removes Font Awesome imports |
| package.json | Removes @fortawesome/react-fontawesome dependency |
| package-lock.json | Removes Font Awesome React component and related peer dependency entries |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://icy-tree-070bd9f0f-6.eastus2.3.azurestaticapps.net |
1 similar comment
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://icy-tree-070bd9f0f-6.eastus2.3.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://icy-tree-070bd9f0f-6.eastus2.3.azurestaticapps.net |
ielements and the appropriate classes./assets. For JS and CSS, cache busting occurs as any updates changes the hash in the filename.Reasons/Motivations: