-
-
Notifications
You must be signed in to change notification settings - Fork 272
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
Bundle dependencies #482
Comments
How much of your codebase is ES6? Caching compilations of ES6 is one improvement that can be made. Also if you're using plugins those compilations can be cached too. Cutting down the dependency tree is always good. I'm planning to see if we can make React a smaller load next week myself. Ideally the codebases would be written so that you are just requiring exactly what is needed for your use cases, loading just the tab pane like you're doing. Looking into how these packages are requiring would help to see if this is possible, and if so a custom override with some map config may help. If you want to load it from a single bundle you can always create a bundle with |
I've encountered this before, it's at least partially due to browsers parallel request limit. If there were a way to disable this (does spdy do this) in development it would be less of an issue. |
@chrismcv I think using spdy would probably help a lot. If you want to try it and let us know that would be fantastic. |
Had a go there. Spdy hasn't made a significant difference - unless there is chrome://net-internals/#spdy On Fri, Feb 6, 2015 at 6:33 PM, Matthew Phillips notifications@github.com
|
That's unfortunate. It shouldn't take a browser 2 and a half seconds to make 350 requests to localhost. I'd file a bug with the browser. I'd be curious as to how long it takes to load the same amount of files in Node. |
an option to just make one bundle of all dependencies for injection would be most helpfull |
@guybedford It would be cool if jspm could automatically create bundles for just your package dependencies some how. I'm not sure how this could work but essentially what you would want is a "React bundle", a "lodash bundle", etc. This way your own code would still appear in the debugger as separate files but your package dependencies (which you are probably not going to debug very often) would be in bundles. |
I think it would be useful to have a:
That will just create a bundle containing the jspm_packages dependencies of that code. This way we would only load our current code as separate files. |
you can do I know what you're asking is for an easier feature, but it's not too difficult to implement |
This will be possible with the new bundle changes via |
👍 |
when is the release? |
This is now possible in the beta with |
jspm bundle src/main - [src/*/] dist/deps.js Wow this was a huge performance boost for my dev flow, really helpful, |
When I try |
@mwq27 you need to escape the * in zsh - ts more pedantic/correct about missed + matches putting ' around should do |
Thanks @RonnyPfannschmidt , that was the trick. Now that the bundle runs, it does give me an error:
My exact command is |
I've moved to a jspm style having been used to the brunch approach (of watching and concatting all js into app.js).
For my basic example app, I've nearly 350 requests (using react + react bootstrap + a few images from a theme). This is yielding the network graph below in chrome - which is showing about a 2.5s page load - which when auto reloading is a significantly worse experience than with brunch.
I also noticed that because of the structure of react-bootstrap
yields nearly 50 less requests than
Has anyone else encountered anything similar? Are there ways to improve on this? Would serving with express-spdy or something similar make a difference?
Thanks,
Chris
The text was updated successfully, but these errors were encountered: