vaadin/flow-and-components-documentation

pnpm switch for Vaadin 14.2+

Opened this issue · 0 comments

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