Skip to content

Application Shell Template does not work: index.html does not get used in production #20629

Closed
@leangermany

Description

Description of the bug

The index.html file does not get used in production mode. I added a <script> to the head and in dev mode it works fine. When using mvn package -Pproduction the index.html does not contain any of my changes. In fact the default template is used.

Expected behavior

The /frontend/index.html is used in production mode.

Minimal reproducible example

  1. Download a new default starter with an empty Flow page from start.vaadin.com
  2. Change the index.html, remove all comments & add script
  3. Execute mvn package -Pproduction
  4. Execute the jar
  5. Incpect the website in browser. No script is there and all comments are back (like <!-- This outlet div is where the views are rendered -->)

Versions

  • Vaadin / Flow version: 24.5.7
  • Java version: 17 & 21
  • OS version: Win 10
  • Browser version (if applicable): Chrome, Firefox
  • Application Server (if applicable): starter default
  • IDE (if applicable): VS Code

Metadata

Assignees

Type

No type

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions