Docs

Documentation versions (currently viewingVaadin 24)

Set Up Production Mode

To run Flow+MPR in production mode you need to update the project as explained in Deploying to Production.

The flow-server-production-mode dependency sets productionMode=true using a web-fragment.xml that then also reflects to Vaadin 7/8 production mode setting.

Below is an example of a production mode profile for MPR:

<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>com.vaadin</groupId>
                <artifactId>flow-maven-plugin</artifactId>
                <version>${flow.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>build-frontend</goal>
                        </goals>
                        <phase>compile</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</profile>

CABF3F60-77E2-492B-9AF4-76088DEB3305