Skip to content
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

Support code-splitting #24

Closed
jessehattabaugh opened this issue Sep 28, 2017 · 5 comments
Closed

Support code-splitting #24

jessehattabaugh opened this issue Sep 28, 2017 · 5 comments

Comments

@jessehattabaugh
Copy link

My bundle gets split into something like 26 chunks, but when I run size-limit it only tells me the size of the entry chunk.

@ai
Copy link
Owner

ai commented Sep 28, 2017

Just add other chunks names to "path". Show me your dist/ content and size-limit section in package.json.

@jessehattabaugh
Copy link
Author

That would be difficult to maintain since code-splits can be introduced anytime a new module is added (we use AMD modules).
package_json_ ___code_web
project_ ___code_web
project_ ___code_web

@jessehattabaugh
Copy link
Author

Also as you can see my bundle includes css and image files. I'd consider all these to be part of my application's "size" as well.

@ai
Copy link
Owner

ai commented Sep 28, 2017

I think this will fix your problem:

"path": "../webapp/src/main/webapp/static/bundle/*.{js,css,png,svg}"

Gzipping directory is not the best solution since you will count .map source map files too (these files are loaded only on open DevTools).

@ai ai closed this as completed Sep 28, 2017
@jessehattabaugh
Copy link
Author

Good point about the .map files!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants