Using custom assets in Umbraco 15 property editor (files not imported direcly by entrypoint)

I’m trying to create a property editor that uses an external package (flexmonster). The problem is that when using this library, she needs access to assets inside node_module folder.

I’ve configured Vite to copy the folder and all of it’s contents to the App_Plugin folder, but when loading the property editor in backoffice, the folder is ignored.

Bellow some print screens:

To reach the App_Plugins folder in general, you should use the path /App_Plugins/FlexmonsterReportEditor/flexmonster/flexmonster.js. By the looks of it from your screenshot, you have your own files in this path, but some of the other assets are one level above that, which is probably why it gives you trouble.

I would advise you to let Vite build your plugin as a library. It will grab all the assets automatically, minify them, and put them together somewhere where they can be loaded.

See their guide on Library Mode here:

It will work in most cases for static assets, but sometimes you may run into issues for dynamically generated assets, where this guide can be useful in addition to Library Mode above: