Skip to content

Add JavaScript hot-reloading to frontend template#17

Merged
williamthome merged 3 commits intomainfrom
fix/esbuild-js-recompilation
Sep 15, 2025
Merged

Add JavaScript hot-reloading to frontend template#17
williamthome merged 3 commits intomainfrom
fix/esbuild-js-recompilation

Conversation

@williamthome
Copy link
Member

  • Add js_reloader.erl module to handle JavaScript rebuilds
  • Configure reloader to watch assets/js directory for .js file changes
  • Runs npm run build:js when JavaScript files are modified
  • Broadcasts js reload event via arizona_pubsub for live updates
  • Includes error handling for failed JS builds with output logging

- Add js_reloader.erl module to handle JavaScript rebuilds
- Configure reloader to watch assets/js directory for .js file changes
- Runs npm run build:js when JavaScript files are modified
- Broadcasts js reload event via arizona_pubsub for live updates
- Includes error handling for failed JS builds with output logging
- Include js_reloader.erl in arizona.frontend.template file list
- Ensures JS reloader module is created when generating new projects
- Fixes missing template entry for JavaScript hot-reloading functionality
- Add 50ms debounce to CSS reloader to prevent excessive rebuilds
- Add 20ms debounce to JS reloader for faster feedback on JavaScript changes
- Optimizes performance by batching rapid file changes
- Reduces unnecessary build cycles during development
@williamthome williamthome merged commit 6cdb060 into main Sep 15, 2025
4 checks passed
@williamthome williamthome deleted the fix/esbuild-js-recompilation branch September 15, 2025 19:56
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