How to include Vite compiled JS into admin panel?

I am creating a custom field, that needs to use a JS library. I am importing that library and initializing it from npm modules.

So afaik, I need to make sure this is built by Vite, i.e. I could add it app.js, but it seems that the layout for the default admin panel does not include app.js.

How can I go about including a compiled JS file from Vite into my Filament admin pages?
Solution
Alright. Looks like I solved it following these steps:
Was this page helpful?