I am currently working on an Angular 2 project that was initialized using the Angular CLI. My main goal is to ensure that the initial load of the project is as fast as possible. To achieve this, I have been focusing on reducing the sizes of all the bundles.
One particular challenge I've encountered is with the rxjs library, as it has significantly increased the size of the bundle. I have been exploring various importing techniques, such as tree shaking, in order to further minimize the chunk size. Although I have tried utilizing suggestions from VSCode for importing, they seem to work during coding but result in errors when building the project using the CLI.
For example, I attempted the following import which did not work:
import { of } from 'rxjs/observable/of';
As a workaround, I had to use:
import { Observable } from 'rxjs/Rx';
Does anyone know of another method to import specific operators successfully?