Skip to content

Dark mode does not work in production #15638

Description

@marcushellberg

Description of the bug

Adding @Theme(variant = Lumo.DARK) to the AppShellConfigurator as documented turns on the dark variant in development mode.

If you do a production build with mvn package -Pproduction and then run the resulting jar file, the app does not use the dark variant.

Expected behavior

The dark variant is shown.

Minimal reproducible example

@SpringBootApplication
@Theme(variant = Lumo.DARK)
public class Application implements AppShellConfigurator {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}

Versions

  • Vaadin / Flow version: 23.3.2, 24.0.0.alpha7
  • Java version: 19
  • OS version: MacOS 13.1
  • Browser version (if applicable): Chrome 108