Enabling Hot Module Reload in WebPack Aurelia CLI Project

Marc-Andre Roy | Dec 12, 2017 min read

Disclaimer (January 2025): This article was written eight years ago and may no longer be applicable to the latest version of Aurelia. Consult the official Aurelia documentation for current information.

When migrating an Aurelia project to the CLI, enabling Hot Module Reload (HMR) proved simpler than expected.

The key was discovering an hmr configuration flag within the aurelia.json file. You only need to set it to true and voilà — HMR started working out of the box without any further effort.

HMR lets you see your changes live, without having to constantly wait for a full page reload when you’re running the au run --watch command, which significantly improves the development workflow by reducing wait times.