flow-and-components-documentation
flow-and-components-documentation copied to clipboard
pnpm switch for Vaadin 14.2+
The documentation says:
To switch between npm and pnpm you can use the vaadin.pnpm.enable system property - setting it to true switches to pnpm.
For a Spring Boot based project, you can put vaadin.pnpm.enable = true into the application.properties file.
Then:
Alternatively, the property can be also set to the vaadin-maven-plugin, using pnpmEnable. Note that you need to add it for each plugin definition.
The configuration of the pom.xml is required to switch to pnpm when you are only running mvn commands like mvn package (-Pproduction).
And the configuration in application.properties (if you are using Spring Boot) is required if you don't run.
Few cases with Spring boot: With the pom.xml configured and no configuration in vaadin.pnpm.enable in application.properties:
- run the Application class, npm is used
- run mvn spring-boot:run , pnpm is used