Workaround for js.Build on modules?

It would work like this if the npm dependencies was not loaded from a Hugo module. Since Hugo now can do PostCSS and JS processing (ESBuild) I would like to avoid having to install more tooling to compile the JS.