Umbraco-package.json vs manifests.ts

Trying to follow along with this documentation topic here about creating a custom dashboard:

At step 2 you choose either to utilize the umbraco-package.json file or a manifests.ts. It seems as if the rest of the documentation assumes you go with the json file approach which has me confused.

  1. Where is this manifests.ts supposed to be located?
  2. Should you point to that as the entry point in your vite.config.js?
  3. Do you still need an umbraco-package.json file in your built output files in the end?

You always need a manifest because that’s obviously where you register your extensions.

You can write your individual extensions directly in umbraco-package.json. However, you can also bundle all your manifests in a ‘bundle’ and register that bundle as the only extension in umbraco-package.json: Bundle | CMS | Umbraco Documentation

So you always need a umbraco-package.json, but the way how you register your extensions is up to you. If you know development well enough, I would always opt for the bundle approach. This way you can spot mistakes easier by compiling typescript into the bundle.

The example is a bit weird in my opinion because that example has the dashboard itself as an the entrypoint, but in reality you probably have multiple extensions working together. That’s why I like the bundle approach best.

I had the same confusion when I read that documentation as well, trying to make my first plugin. I would highly recommend checking out GitHub - LottePitcher/opinionated-package-starter: Get a head start when creating Umbraco Packages · GitHub I have used that to successfully make a few packages now and by studying it’s structure and built-in examples, I was able to figure out a lot of stuff.

Yes, but even the extension template of Umbraco itself is already quite good. Less explanation, but still enough plumbing to understand the bundle approach.

I still don’t understand manifests.ts that is mentioned in that documentation I linked.

When is that ever used? Is it used instead of umbraco-package.json? Or does it compile into that? Or is it used in tandem with it?