-
Notifications
You must be signed in to change notification settings - Fork 7
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
Incompatible with Vite #90
Comments
Any thoughts on this, @vursen ? |
We might need to add |
It seems like this works if you are using the component bundle because there the commented code is intact. If you use e.g. 23.0.5 where the bundle is not used because of some version mismatches, you see this problem |
When the component bundle is not used, the license checker ends up optimized by Vite's deps optimizer (esbuild) which happens to eliminate code comments along the way. The usage statistics module is included in Vaadin Router which is explicitly excluded from that optimization, which explains why the stats module is not affected. One way to fix the issue would be to add |
…13625) Excludes @vaadin/vaadin-license-checker and @vaadin/vaadin-usage-statistics from the Vite deps optimization to prevent the special part of their source code serialized into a code comment from eliminating in dev mode: Fixes vaadin/license-checker#90.
…13625) Excludes @vaadin/vaadin-license-checker and @vaadin/vaadin-usage-statistics from the Vite deps optimization to prevent the special part of their source code serialized into a code comment from eliminating in dev mode: Fixes vaadin/license-checker#90.
…13625) (#13626) Excludes @vaadin/vaadin-license-checker and @vaadin/vaadin-usage-statistics from the Vite deps optimization to prevent the special part of their source code serialized into a code comment from eliminating in dev mode: Fixes vaadin/license-checker#90. Co-authored-by: Sergey Vinogradov <mr.vursen@gmail.com>
If you use Vaadin 23 and Vite, then
window.Vaadin.developmentModeCallback["vaadin-license-checker"]
is never definedIn
function uncommentAndRun(callback, args) {
the value ofcallback.toString()
iswith webpack
with Vite
window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]
works fine with both vite and webpackThe text was updated successfully, but these errors were encountered: