Custom module loaders and script tags

Guy Bedford guybedford at
Fri Jun 7 20:29:45 PDT 2013

I'm trying to work out how custom module loaders can be used with standard
script tags.

For example, say I create a RequireJS-style loader (with an identical
configuration API including map config etc), and want to use this within a
script file loaded via a script tag:

  var RequireJSStyleLoader = new Loader({
    // ... etc ...
<script src="some/module/file.js"></script>

How do I configure the loader to know that "some/module/file.js" should
have its imports and module declarations applied with my custom loader
(RequireJSStyleLoader) and not the system loader?

Or is it only possible to set a custom loader for imports executed with
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list