fuse-box / fuse-box-aurelia-loader

MIT License
14 stars 2 forks source link

envplugin for setting logging, reload and hmr #15

Closed vegarringdal closed 7 years ago

vegarringdal commented 7 years ago

Maybe we should use this: http://fuse-box.org/#envplugin

For setting these:

(<any>window).FUSEBOX_AURELIA_LOADER_LOGGING = true; // activate logging (when aurelia developmentLogging is used)
(<any>window).FUSEBOX_AURELIA_LOADER_HMR = true; // activate hot reload (need aurelia-hot-module-reload to work)
(<any>window).FUSEBOX_AURELIA_LOADER_RELOAD = true; // just reload document on fusebox hrm event (file change)

Could have been like this:

fb.EnvPlugin({ 
       FB_AU_LOG: true,
       FB_AU_HMR: false,
       FB_AU_RELOAD: true 
})

That way you its easier to set when building

what do you think @arjendeblok @Thanood

arjendeblok commented 7 years ago

@vegarringdal Looks fine to me

arjendeblok commented 7 years ago

@vegarringdal Please do that. You do not want to set debug information in your code. If you can change that then I will change the aurelia-seed to use that construct.

vegarringdal commented 7 years ago

@arjendeblok fixed, also updated the readme file with some notes about this, and that cache needs to be set to true for HMR to work

vegarringdal commented 7 years ago

Made it so both ways work, that way we dont break it for others