In my opinion i think you could switch your script to the import syntax from the require to the import "foo" from "bar", also i advise you to remove module exports if you are not so dying to use those cool features