having it be a js file means various bundlers and optimizers can't work well shouldn't be hard to allow the user to pass in an already imported middlewaresModule, unless you can think of a better way to deal with that