-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Reduce bundle size with webpack and angular #4326
Comments
If you're using angular-cli then tree shaking on rxjs should be work automatically. Otherwise have a look here: https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md#build-and-treeshaking |
Yes I am using Angular-CLI and tree shaking should be working. After I removed all "rxjs/interal/operators"-imports the bundle was much smaller because the tree-shaking-process can remove the most "internal"-dependencies. Are there other imports that should be avoided? For me, It looks a little bit strange, that zip.js, groupBy.js, Subject.js, etc. are included in the _esm5 bundle and the internal bundle. |
Are you using rxjs-compat? There is a problem there with Observable being imported from internal and not _esm5. #4070. |
No, I am not using rxjs-compat anymore. Now I have scanned all files again. There was one import from 'rxjs/index' all other where from 'rxjs' directly or 'rxjs/operators'. After removing the index import the file shrinks again from gzipped 36kb to 24kb. Thank you |
Hi
I am using rxjs. 6.3.3 within an angular 6 application. Caused by some performance issues, I am currently reducing the size of our bundles (webpack v4).
The size of the bundle shrinks after i removed all"rxjs/interal/operators" imports.
Unfortunately my threeshaked bundle still contains an 'internal' module, as you can see in the screenshot below.
Are there possibilites to remove the 'internal' module?
Thanks in advance
The text was updated successfully, but these errors were encountered: