Open darmro opened 3 years ago
It sounds like an oversight in the documentation as you do not need the polyfill for any of the browsers Vaadin 18 supports
Related to that change apparently: https://github.com/vaadin/flow/pull/7416. Documentation update is needed.
Description of the bug
According to the documentation in "Introduction to Embedding Applications": https://vaadin.com/docs/v18/flow/embedding-flow-applications/tutorial-webcomponent-exporter.html and even new https://vaadin.com/docs-beta/latest/flow/embedding/intro/ to embed the exported application in a page one have to:
In Vaadin 14+ url "YOUR_EMBEDDED_APPLICATION_URI/VAADIN/build/webcomponentsjs/webcomponents-loader.js" in application was ok. But in Vaadin 18+ (I've checked 18.0.6 and 19.0.beta3) this url is a dead end. For Vaadin 18+ polyfill module is not served by the application (or is not accessible).
Minimal reproducible example
I took "Hello World Example / Plan Java Vaadin 14". Added a simple WebComponentExporter class and a simple servlet- all according to instructions from documentation (even for Vaadin 18+).
Quick test for Vaadin 14:
everything is ok, url "http://localhost:8080/project-base/VAADIN/build/webcomponentsjs/webcomponents-loader.js" works.
I've changed in pom Vaadin version to 18.0.6:
url "http://localhost:8080/project-base/VAADIN/build/webcomponentsjs/webcomponents-loader.js" is dead - (HTTP Status 404 – Not Found). The same app (as for previous test) so url in my servlet is for sure correct.
Of course for both applications file webcomponentsjs/webcomponents-loader.js is present in node_modules. So why it's not accesible from web application.
My simple test app (V 18+): skeleton-starter-flow.zip