Hi guys.
I’ve tried to add a login screen to my simple webapp and
I did all steps from this tutorial https://vaadin.com/learn/tutorials/modern-web-apps-with-spring-boot-and-vaadin/adding-a-login-screen-to-a-vaadin-app-with-spring-security
It all works fine but only in dev mode.
As soon as I run it in production mode the login page is broken.
I see only text label taken from @PageTitle(“Login | Reports”).
No errors found in the log.
I switched vaading to the latest version 17, switched from npm to pnpm but no luck.
I use java 14 and the only unusual thing I’ve added is ‘–enable-preview’ but it works fine id dev mode.
Could you please give me a hint what could be wrong?
Here is production section from my pom.xml
<profile>
<!-- Production mode is activated using -Pproduction -->
<id>production</id>
<properties>
<vaadin.productionMode>true</vaadin.productionMode>
</properties>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-server-production-mode</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<jvmArguments>
-Dvaadin.productionMode --enable-preview
</jvmArguments>
<image>
<env>
<JAVA_OPTS>--enable-preview</JAVA_OPTS>
</env>
</image>
</configuration>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>build-frontend</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
<configuration>
<pnpmEnable>true</pnpmEnable>
</configuration>
</plugin>
</plugins>
</build>
</profile>