Multi module client script

Hello everyone, I’m currently developing a product and during development I ended up with a very long and large js file (client script) of 1500 lines, and I want to decompose it into modules. Is there documentation or a topic on this topic?