Add a script to Discourse's webpack

Is there a guide for this? Haven’t tried that before.