-
Notifications
You must be signed in to change notification settings - Fork 3k
Why is file size so big? #3971
Copy link
Copy link
Closed
Description
I'm using RxJS6 in Undux, via typed-rx-emitter. I use it by importing Observable, and calling Observable.create. I don't use any other Rx methods.
Bundling Undux (+typed-rx-emitter, +rxjs) in as part of undux-todomvc, I see all sorts of things included in the bundle that I'm not using. Eg:
- CombineLatestOperator
- MergeMapOperator
- MapOperator
- RaceOperator
- ZipOperator
- AsyncSubject
- BehaviorSubject
- Subject
- ReplayEvent
- AsapScheduler
- VirtualTimeScheduler
- ForkJoinSubscriber
- ZipBufferIterator
All in all, that's ~80kb (unmangled). Even after running the code through Uglify's tree shaker, these are included. Are they core parts of Rx.Observable.create? Is there a way to remove them? Am I doing something wrong when bundling?
Repro:
Generated bundle.js (after Uglify)
Uglify options:
new UglifyJsPlugin({
cache: true,
parallel: true,
sourceMap: true,
uglifyOptions: {
keep_classnames: true,
keep_fnames: true,
mangle: false
}
})
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels