But critically locate() may also choose to consult metadata which may contain config settings ala classpath as @guybedford says. That is why the name is not a .js string: don't let devs think the string is a file name, it's a thing that must be resolved.  locate may prepend baseURL/append .js; it may do more.