I’ve been experimenting with creating a needle project inside a monorepo so that I could have a utility package that has multiple utility functions that I would be able to use in multiple needle projects. Including the utility package inside of my needle project’s package.json seems to break the app. Is this approach possible, what kind of configuration steps do I need to make if it is possible?
Yep, that’s possible - you can basically make custom regular npm packages that have a peer dependency on needle engine.
From inside Unity we’re providing NpmDefs as a convenient way to create and use those utility packages - many of our samples use them this way, including a „Shared“ npmdef that is used across multiple samples
You can for example checkout our samples where we have a bunch of scenarios where scripts are shared among multiple projects. You create a npmdef and then drag it into the ExportInfo dependencies array. Does that answer your question?
“by creating a package in Unity” you mean creating a npmdef? And can you elaborate what you mean by “pointing it to my existing package in my monorepo” ? The existing package is a web project (npm package) or a Unity package
no it doesnt, it needs to have a package.json / be a npm package - is this what you want? e.g. does your monorepo has scripts that you want to include in your web project?