Tag Archives: vite

Convert react app built with frontend-maven-plugin from webpack to vite

The frontend-karaf-demo project is a maven project that builds a jar file containing a servlet and compiles a react application, with frontend-maven-plugin, into static files that can be added to the jar file’s classpath and be served by the servlet.

With the frontend-maven-plugin, building a webapp can be integrated into a maven build, without the builder having to download and install node.js. The frontend-maven-plugin downloads its own node.js to handle npm depdencies and do the build.

This bloggpost describes the things I had to do, to convert the webapp build in this setup from webpack to vite.

Note: to follow this recipe npm must be installed (but it is possible to achieve the same effects by manually editing package.json). Continue reading Convert react app built with frontend-maven-plugin from webpack to vite