Prevent Hilla from editing package.json

Hi, I am working with hilla version 2.1.9 and spring boot 3, I am trying to use a React v17 template, and hilla/react-components(react v18) depndency is added every time app is started, how can I prevent hilla to add any dependency to package.json ?

It seems your actual issue is that you want to use React 17, while Hilla wants to use React 18. The general idea is that Hilla dictates the React version, and all dependencies that it brings out of the box are aligned with that. That includes all Hilla React related packages like react-components, react-form or react-crud. If you want to use none of those you could try removing the following dependency from pom.xml, which should prevent it from adding @hilla/react-* packages to package.json:


Note that it will still add or update other dependencies when you change the Hilla version for example. That’s how the framework is designed, the idea is to let the framework manage the core dependencies itself so that developers don’t have to spend time on upgrading and resolving version conflicts manually.

Apart from that you could create an issue explaining your use case here: