vaadin / flow

Vaadin Flow is a Java framework binding Vaadin web components to Java. This is part of Vaadin 10+.
Apache License 2.0
602 stars 165 forks source link

Front-end compilation spits a "Some chunks are larger than 500 kBs" warning #16253

Open mstahv opened 1 year ago

mstahv commented 1 year ago

Description of the bug

In a Vaadin 24 app I get rid of this scary warning in my Vaadin application (using just core components and one js file with ~ 4 lines):

(!) Some chunks are larger than 500 kBs 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.

Expected behavior

Chunks should be smaller than 500 kBs 🤪 Or hide warnings if the behaviour is considered normal.

Minimal reproducible example

Check out this example and build it:

https://github.com/vaadin-learning-center/calling-java-from-javascript

Versions

Artur- commented 1 year ago

You should no longer see this with 24.1 alpha 4