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

Reducing webpack file (index.js) size for loading #76

Open
Tracked by #81
poojaparasharam opened this issue Mar 5, 2018 · 6 comments
Open
Tracked by #81

Reducing webpack file (index.js) size for loading #76

poojaparasharam opened this issue Mar 5, 2018 · 6 comments

Comments

@poojaparasharam
Copy link

I wanted reduce webpack file size using code splitting, now my webpack file (index.js) size is around 5 MB.
As i tried using lazy loading , code splitting but still my file size is same.

@tony-shannon
Copy link
Member

Can you please clarify the issue..
thanks
Tony

@poojaparasharam
Copy link
Author

When we build webpack , the file (index.js) size is around 5 MB because i am loading every module in the initial page load. So i wanted to reduce this 5 MB to around 1 MB.

@tony-shannon
Copy link
Member

thanks @poojaparasharam

@kbeloborodko could you reply to this when you get a chance please?
I understand there has been work done on this

@kbeloborodko
Copy link
Collaborator

@poojaparasharam could you please clarify what steps have been taken to introduce code splitting?
@tony-shannon 5 Mb is the size of the build that has been already reduced (initially it was around 9 Mb) and we did not do code splitting within the Angular version. We have code splitting in the React version though.

@poojaparasharam
Copy link
Author

Sorry for late reply.

In webpack entry point, index and vendor JS files are used for code splitting. index.js file is loading all components and vendor.js is loading third party packages(angular packages). when i build application, index file size is 4.8 MB ,and vendor file size 638 KB.

Now my requirement is to reduce index file size,because it's taking time to load application initially.

And one more help is needed, when i initially load application i want to load only patients list component , and if require or if we click on any patient then only load all modules component(vitals component, compliant component , etc),how can i achieve this in angularJS.

Please do needful help. Thank you.

@tony-shannon
Copy link
Member

@poojaparasharam Do you have any ideas as to how to make any of these improvements yourself?

This is an open source project... so its about give as well as take :o)

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

No branches or pull requests

3 participants