alexisvincent / systemjs-hot-reloader

reloads your modules as needed so that you can have satisfyingly fast feedback loop when developing your app
MIT License
228 stars 36 forks source link

How to do custom loader? #143

Closed wegorich closed 7 years ago

wegorich commented 7 years ago

I'm trying to do Aurelia.js HMR here Aurelia HMR. But can't find the way to setup communication between System HMR and Aurelia loader.

Would be nice to find example for change subscription. Or how to do custom loader.

wegorich commented 7 years ago

Looking to the webpack implementation, they have:

Do we have any similar methods or alternatives to manage the HMR module behavior?

Going to avoid such code in each modules:

import {module} from '@hot'
__unload()...

, and make general loader, manage that's stuffs in one place. In custom loader.

Does it even possible?

wegorich commented 7 years ago

I create a sample to show what am I doing aurelia-systemjs-loader.

In general I need some how trigger class methods here loader for example, after systemjs-hot-loader loads module after changes.

I'm stuck would be glad for any help

alexisvincent commented 7 years ago

Lets jump on an instant messenger. One moment.

alexisvincent commented 7 years ago

you should have received an invite to the gitter room alexisvincent/systemjs-hmr

wegorich commented 7 years ago

So custom loader for systemjs doing via plugins: documentation how to, example for vue

it solves my issues with systemjs