Allow loading echarts library lazily via native import #246
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @xieziyu
I did not bother you for a long time, it's time to do this again :)
The new way of importing the echarts is very heavy, because it loads the whole echarts in the application right away; however in most of my projects the echarts is a helper library which appears on several secondary pages.
Even if you make a custom build, it's still 170K gzipped which needs to be downloaded and parsed => performance goes down.
This PR aims this issue.
Actually I wanted to use this approach for protobuf
Any
data type at my https://github.com/ngx-grpc/ngx-grpc for a long time and always didn't have this time to implement it. So, sorry, but looks like we need to test it with ngx-echarts :)The change is not breaking, and to use all its goodness one just need to change the imports in app.module.ts
Please attack me if I miss something.
Thanks!