Guy Bedford

Results 1051 comments of Guy Bedford

SystemJS 2.0 was designed with hotreloading in mind with a couple of features: 1. Registry API with delete and get only https://github.com/systemjs/systemjs/blob/master/docs/api.md#registry-api-systemjs-only 2. onload hook for tracing - https://github.com/systemjs/systemjs/blob/master/docs/hooks.md#onloadurl-error-sync The...

Yes, exactly some kind of convention / pattern for that on top like you had works great. Building it into core still seems unnecessary though, I still like the two...

@capaj you could add a custom post-translate hook to the loader that reads `load.metadata.sourceMap` and store it in a cache somewhere?

@capaj, yes you can always hook the loader directly - ``` javascript var systemTranslate = System.translate; System.translate = function(load) { return systemTranslate.call(this, load) .then(function(translated) { sourceMapCache[load.name] = load.metadata.sourceMap; return translated;...

@capaj `load.metadata.sourceMap` is only set when using plugins or when using a transpiler to load the file. Normal module loads (AMD / CommonJS / global) do not have this value...

@capaj yes you are correct. This will only happen in the 0.17 version when we use https://github.com/systemjs/plugin-babel. Apologies for sending you down a wrong path here for now.

The built in transpilers are being deprecated for 0.17. Loaders are set via config - see https://github.com/systemjs/systemjs/blob/master/docs/overview.md#plugin-loaders.

I've been experimenting with a dynamic deps trace in https://github.com/ModuleLoader/es-module-loader/commit/4f23167e02f4b449fad8fd8e0a53c53ea80e485d. What we can do is catch all calls to the dynamic `import` (not `System.import`, but the contextual import when compiled...

Ok, then the implementation I've got there should be a good start to play around with. It's not possible to tell when `System.import` is run within which module, as there...

@alexisvincent this will be shipping in the next SystemJS release, which should be soon.