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
chore!: Remove fallback chunk #16592
Conversation
Test Results 980 files - 2 980 suites - 2 1h 14m 3s ⏱️ - 4m 31s Results for commit 5a8a609. ± Comparison against base commit 3dae5ba. This pull request removes 10 tests.
♻️ This comment has been updated with latest results. |
0141267
to
a5d7686
Compare
The fallback chunk contained all JavaScript and CSS for classes which cannot be reached from an entry point (route or exported web component). By removing it we improve performance as we do not need to scan all classes, only the reachable ones. We also fix issues with the license checker as it did not really know how to behave with commercial components that may or may not be used. The drawback of removing the fallback chunk is that if you are using a component which is not reachable, as determined by the scanner, then your JS/CSS for the component will be missing. The typical case for this is having a factory that can create components using reflection. The scanner is not able to find the referenced classes as they only appear as a string in the source code. For this case, you need to add `@Uses(SomeComponent.class)` to the factory, for each component it can create using reflection. To be able to detect unreachable components in development mode, you should set the `devmode.optimizeBundle` property to `true`. Fixes #15929
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
This ticket/PR has been released with Vaadin 24.1.0. |
The fallback chunk contained all JavaScript and CSS for classes which cannot be reached from an entry point (route or exported web component). By removing it we improve performance as we do not need to scan all classes, only the reachable ones. We also fix issues with the license checker as it did not really know how to behave with commercial components that may or may not be used.
The drawback of removing the fallback chunk is that if you are using a component which is not reachable, as determined by the scanner, then your JS/CSS for the component will be missing. The typical case for this is having a factory that can create components using reflection. The scanner is not able to find the referenced classes as they only appear as a string in the source code. For this case, you need to add
@Uses(SomeComponent.class)
to the factory, for each component it can create using reflection.To be able to detect unreachable components in development mode, you should set the
devmode.optimizeBundle
property totrue
.Fixes #15929