Documentation

Documentation versions (currently viewingVaadin 23)

You are viewing documentation for Vaadin 23. View latest documentation

Setting up production mode

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

Note
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.

Sample 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