PureScript modules are static - they require a “runtime” which in the JavaScript backend is a file which just loads the static module and executes it. I think you can’t get away from it. You can automate this, by having a Makefile or script which creates these accompanying executor files.
Purs bundle has an option to inject that module executor line in a module, but I’m not a fan of that feature as it should be outside the scope of a bundler tool. I think the purs loader has options for using purs bundle, but idk how it works, or even if it’s desirable for your situation.
I have a few thoughts on purs-loader I’d like to drop here. As I’ve seen it used, it just enables using the webpack file watching and HMR when editing PureScript files. The problem I’ve seen with this is that it takes forever to start that webpack process if using the loader, due to it loading lots of stuff into memory. An alternative is to point webpack in watch mode at the JS output of a PureScript compilation and incrementally recompile single files using purs ide. It’s just so much simpler to maintain, IMO, but it does take a little bit longer to rebundle on change, as the entire dep tree isn’t in memory in the webpack process.
I’d like to hear more about your project - I feel like I’m shooting in the dark with this response.