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

Reduce/remove webpack build warning of servers demo. #1239

Closed
sbernard31 opened this issue Apr 20, 2022 · 4 comments
Closed

Reduce/remove webpack build warning of servers demo. #1239

sbernard31 opened this issue Apr 20, 2022 · 4 comments
Labels
bsserver Impact LWM2M bootstrap server demo Impact our demo (not libraries) enhancement Improvement of existing features server Impact LWM2M server

Comments

@sbernard31
Copy link
Contributor

When building leshan-server-demo or leshan-bsserver-demo, webpack raise some warnings :

E.g. for leshan-server-demo

$ vue-cli-service build --report

⠧  Building legacy bundle for production...

 WARNING  Compiled with 3 warnings                                                                                                                                                                           16:00:51

 warning  

asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets: 
  fonts/materialdesignicons-webfont.aaf5968f.eot (1.11 MiB)
  fonts/materialdesignicons-webfont.ad0f7b3f.woff2 (358 KiB)
  fonts/materialdesignicons-webfont.f5b84261.ttf (1.11 MiB)
  fonts/materialdesignicons-webfont.fabeafb8.woff (516 KiB)
  css/chunk-vendors.02ffd74c.css (743 KiB)
  js/chunk-vendors-legacy.a9c5e753.js (590 KiB)

 warning  

entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  app (1.41 MiB)
      css/chunk-vendors.02ffd74c.css
      js/chunk-vendors-legacy.a9c5e753.js
      css/app.1ab2d4c1.css
      js/app-legacy.deb2bf97.js


 warning  

webpack performance recommendations: 
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/

  File                                                  Size                                                                         Gzipped

  ../target/dist/js/chunk-vendors-legacy.a9c5e753.js    589.70 KiB                                                                   178.17 KiB
  ../target/dist/js/app-legacy.deb2bf97.js              113.69 KiB                                                                   29.11 KiB
  ../target/dist/css/chunk-vendors.02ffd74c.css         742.57 KiB                                                                   113.86 KiB
  ../target/dist/css/app.1ab2d4c1.css                   0.53 KiB                                                                     0.23 KiB

  Images and other types of assets omitted.
  Build at: 2022-04-20T14:00:53.284Z - Hash: 0332b47cfcf6a158 - Time: 43409ms


⠧  Building module bundle for production...

 WARNING  Compiled with 3 warnings                                                                                                                                                                           16:01:33

 warning  

asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets: 
  fonts/materialdesignicons-webfont.aaf5968f.eot (1.11 MiB)
  fonts/materialdesignicons-webfont.ad0f7b3f.woff2 (358 KiB)
  fonts/materialdesignicons-webfont.fabeafb8.woff (516 KiB)
  fonts/materialdesignicons-webfont.f5b84261.ttf (1.11 MiB)
  css/chunk-vendors.02ffd74c.css (743 KiB)
  js/chunk-vendors.9e041928.js (482 KiB)

 warning  

entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  app (1.3 MiB)
      css/chunk-vendors.02ffd74c.css
      js/chunk-vendors.9e041928.js
      css/app.1ab2d4c1.css
      js/app.f7c520e3.js


 warning  

webpack performance recommendations: 
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/

  File                                             Size                                                                            Gzipped

  ../target/dist/js/chunk-vendors.9e041928.js      481.81 KiB                                                                      145.06 KiB
  ../target/dist/js/app.f7c520e3.js                108.75 KiB                                                                      28.58 KiB
  ../target/dist/css/chunk-vendors.02ffd74c.css    742.57 KiB                                                                      113.86 KiB
  ../target/dist/css/app.1ab2d4c1.css              0.53 KiB                                                                        0.23 KiB

  Images and other types of assets omitted.
  Build at: 2022-04-20T14:01:35.650Z - Hash: 6279213a7167a603 - Time: 38457ms
@sbernard31 sbernard31 added server Impact LWM2M server demo Impact our demo (not libraries) bsserver Impact LWM2M bootstrap server enhancement Improvement of existing features labels Apr 20, 2022
@sbernard31
Copy link
Contributor Author

@sbernard31
Copy link
Contributor Author

asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets: 
  fonts/materialdesignicons-webfont.aaf5968f.eot (1.11 MiB)
  fonts/materialdesignicons-webfont.ad0f7b3f.woff2 (358 KiB)
  fonts/materialdesignicons-webfont.f5b84261.ttf (1.11 MiB)
  fonts/materialdesignicons-webfont.fabeafb8.woff (516 KiB)

is removed by #1242

@sbernard31
Copy link
Contributor Author

sbernard31 commented Nov 23, 2023

Since we migrate to vite (#1540) we have different warning ⚠️ :

For bsserver-demo :

✓ 575 modules transformed.
../target/dist/index.html                                              0.67 kB │ gzip:   0.41 kB
../target/dist/assets/logo-Mflhc2Q3.png                                4.95 kB
../target/dist/assets/roboto-vietnamese-400-normal-JAkXt1WZ.woff2      5.56 kB
../target/dist/assets/roboto-greek-400-normal-UVhwlGKP.woff2           7.11 kB
../target/dist/assets/roboto-cyrillic-400-normal-1Q02bZlk.woff2        9.63 kB
../target/dist/assets/roboto-latin-ext-400-normal-OGy6Zcg4.woff2      11.87 kB
../target/dist/assets/roboto-cyrillic-ext-400-normal-zkSvWxgI.woff2   15.34 kB
../target/dist/assets/roboto-latin-400-normal-JkyEVz-m.woff2          15.74 kB
../target/dist/assets/multicolor-leshan-R-yeoNmD.png                  22.80 kB
../target/dist/assets/roboto-all-400-normal-WSfULLFO.woff             65.46 kB
../target/dist/assets/index-QN5xfV_N.css                             446.42 kB │ gzip:  55.71 kB
../target/dist/assets/index-Szu7a8dp.js                              524.62 kB │ gzip: 159.95 kB

(!) Some chunks are larger than 500 kB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
✓ built in 19.60s

For server-demo :

✓ 610 modules transformed.
../target/dist/index.html                                              0.67 kB │ gzip:   0.40 kB
../target/dist/assets/logo-Mflhc2Q3.png                                4.95 kB
../target/dist/assets/roboto-vietnamese-400-normal-JAkXt1WZ.woff2      5.56 kB
../target/dist/assets/roboto-greek-400-normal-UVhwlGKP.woff2           7.11 kB
../target/dist/assets/roboto-cyrillic-400-normal-1Q02bZlk.woff2        9.63 kB
../target/dist/assets/roboto-latin-ext-400-normal-OGy6Zcg4.woff2      11.87 kB
../target/dist/assets/roboto-cyrillic-ext-400-normal-zkSvWxgI.woff2   15.34 kB
../target/dist/assets/roboto-latin-400-normal-JkyEVz-m.woff2          15.74 kB
../target/dist/assets/multicolor-leshan-R-yeoNmD.png                  22.80 kB
../target/dist/assets/roboto-all-400-normal-WSfULLFO.woff             65.46 kB
../target/dist/assets/index--A-ppnc-.css                             435.01 kB │ gzip:  54.98 kB
../target/dist/assets/index-1uAEPk_1.js                              593.91 kB │ gzip: 177.61 kB

(!) Some chunks are larger than 500 kB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
✓ built in 19.27s
Done in 20.26s.

A not successful try to resolve this : rollup/rollup#4327 (comment)

@sbernard31
Copy link
Contributor Author

with #1549, warnings are removed.

But we maybe have too much chunk now ...
(move from ~10 to 40/50 chunks 😬 )

I close this issue anyway. If having too many chunks is an issue we will open a new ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bsserver Impact LWM2M bootstrap server demo Impact our demo (not libraries) enhancement Improvement of existing features server Impact LWM2M server
Projects
None yet
Development

No branches or pull requests

1 participant