Add javascript to a theme component

Is there a good way to add javascript (one file, minimized) to a theme component so that it can be used in common/header.html?

1 Like

Got it working. Just added the JS (not minimized) into the common/header.html.

See discourse-highlight-text/header.html at master · sbernhard/discourse-highlight-text · GitHub

Would be good if someone could document this behavior to the theme /component developer guide.

1 Like