How can i reload custom javascript

how can i reload custom javascript in an addon/plugin so that the javascript remains part of the plugin folder?

what must the folder structure look like?

how must the instruction look like?

for the assets from the main project i did it like this so far


$app->on('admin.init', function () {
// dashboard widgets
    $this->on("admin.dashboard.widgets", function ($widgets) {

the folder hierarchy looks like this, or the target folder should be like this:

I’m not sure, what you mean with “reload”, but if you’re just searching for the path structure, you should be able to use:


All addons/modules get their own path shortcut automatically.

See also: