dapr / dashboard

General purpose dashboard for Dapr
Apache License 2.0
181 stars 47 forks source link

Optimize the size of the resource #211

Open hueifeng opened 2 years ago

hueifeng commented 2 years ago

Before optimization:

> dapr-dashboard@0.2.0 build
> ng build

✔ Browser application bundle generation complete.
✔ Copying assets complete.
✔ Index html generation complete.

Initial Chunk Files              | Names         |      Size
vendor.js                        | vendor        |   3.61 MB
polyfills-es5.js                 | polyfills-es5 | 608.47 kB
styles.css                       | styles        | 203.20 kB
polyfills.js                     | polyfills     | 171.98 kB
main.js                          | main          |  13.03 kB
runtime.js                       | runtime       |  12.92 kB

                                 | Initial Total |   4.59 MB

Lazy Chunk Files                 | Names         |      Size
src_app_pages_pages_module_ts.js | -             |   2.88 MB

After the optimization:

PS I:\source\dashboard\web> npm run build

> dapr-dashboard@0.2.0 build
> ng build

✔ Browser application bundle generation complete.
✔ Copying assets complete.
✔ Index html generation complete.

Initial Chunk Files                                                         | Names                  |      Size
dapr.angular.js                                                             | dapr.angular           |   1.61 MB
styles.css                                                                  | styles                 | 203.20 kB
dapr.core-js.js                                                             | dapr.core-js           |  82.05 kB
dapr.rxjs.js                                                                | dapr.rxjs              |  80.79 kB
vendor.js                                                                   | vendor                 |  61.18 kB
dapr.web-animations-js.js                                                   | dapr.web-animations-js |  46.04 kB
dapr.zone.js.js                                                             | dapr.zone.js           |  44.66 kB
polyfills-es5.js                                                            | polyfills-es5          |   9.37 kB
main.js                                                                     | main                   |   3.64 kB
runtime.js                                                                  | runtime                |   3.10 kB
polyfills.js                                                                | polyfills              |   2.10 kB

                                                                            | Initial Total          |   2.13 MB

Lazy Chunk Files                                                            | Names                  |      Size
dapr.moment.js                                                              | dapr.moment            | 286.78 kB
src_app_pages_pages_module_ts-node_modules_moment_locale_sync_recursive_.js | -                      | 150.20 kB
dapr.js-yaml.js                                                             | dapr.js-yaml           |  38.66 kB
codecov[bot] commented 2 years ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (298a16a) 27.56% compared to head (45e4559) 27.56%.

:exclamation: Current head 45e4559 differs from pull request most recent head 407529a. Consider uploading reports for the commit 407529a to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #211 +/- ## ======================================= Coverage 27.56% 27.56% ======================================= Files 7 7 Lines 798 798 ======================================= Hits 220 220 Misses 554 554 Partials 24 24 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

yaron2 commented 8 months ago

@hueifeng can you please resolve the conflict? we should be able to merge then.