export class UpperValueConverter {
toView(name: string) {
return name && name.toUpperCase();
}
}
When imported locally in a view with <require from="converters/upper"></require>, the code does hot reload. The bindings don't refresh immediately but on the next value change I can see that the new converter code is running.
If I declare that converter as a global resource in my main file, like so:
I noticed that in the second case, loading the converter does not go through any of the module.hot.accept paths in aurelia-loader-webpack, which explains why HMR doesn't work.
I was playing with a basic value converter:
When imported locally in a view with
<require from="converters/upper"></require>
, the code does hot reload. The bindings don't refresh immediately but on the next value change I can see that the new converter code is running.If I declare that converter as a global resource in my main file, like so:
Then it doesn't work and triggers a full-reload.
I noticed that in the second case, loading the converter does not go through any of the
module.hot.accept
paths inaurelia-loader-webpack
, which explains why HMR doesn't work.