-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preemptive File Loading #12
Comments
Isn't this already possible with systemjs config and made easy with jspm? Or would you like to cache them in the browser? |
@peteruithoven What I'm talking about here is slightly different. I've changed the name to be more descriptive. I want something like this System.reload("app/a.js", {
from: {
"app/a.js": {
source: 'module a source code'
},
"app/b.js": {
source: 'module b source code'
},
}
}) So that the hot-loader can precompile and send over the changed files. This will essentially only save the load time latencies that would be incurred by |
Ah alright. In your example b.js would be an dependency of a.js? And this idea would spare you waiting for a.js to transpile before b.js could be loaded? |
Yes pretty much. When we reload a.js, all the transitive parents are deleted, and then need to be reimported. The idea here is just to minimize the work the client needs to do (including the latency of fetching a file). Especially helpful if you have't specified a depcache. I also want to be able to pass in other things to save time with the reload. At the moment, theres a lot of work that happens on each file reload, since my implementation recalculates the dependency tree each reload. So the server would be able to do this calculation instead and send over the dependency tree with the already compiled files :) |
I'm trying to maintain a clean and minimal TypeScript project setup that doesn't include Babel, Webpack or jspm (there's a crude initial version). Hopefully the precompilation could be a separate package to avoid bloating up My goal is to also get rid of I wish all Node.js toolchain bloat could be eliminated. |
@jjrv Just to clarify, things discussed in this issue are completely optional mechanisms to give a speed boost to the reload process. Also, I'm not building in recompilation steps, just the ability for something else to precompile and pass that to systemjs-hmr. As explained here
So even with this addition, you would still need some external tool to take advantage of the speedup |
[Edited to include pertinent comments]
One should be able to precompile files and pass them to systemjs-hmr for a quicker reload cycle.
Something like this
So that the hot-loader can precompile and send over the changed files. This will essentially only save the load time latencies that would be incurred by
System.import
The text was updated successfully, but these errors were encountered: