Open briancavalier opened 10 years ago
After discussion w/@unscriptable, I added a simple experiment in the extension-based-loading branch. It's a plugin that delegates to other plugins by transforming resource ids based on their extension. It works great, but requires that you either explicitly use it as a plugin, e.g. 'ext!'
, or specify it as a moduleLoader
. Neither is really ideal (hence it's still an experiment :) ), but at least it shows that resource id transformation is a valid approach.
It'd be nice if this were mostly invisible, but we still need to work that out.
Any progress with this at all? :D
Sorry, @gehan. Not much time lately. :(
No probs! Was mainly of interest for relative paths in specs which seems to be possible in the newest develpments!
It'd be great to support loading different types of resources based on file extension, or module id pattern matching. Also, AMD plugin syntax, or the like, will not be supported as a first-class syntax in ES6 module loaders, so that's an indication that an AMD-like plugin approach probably is not the future. Using Extensions and/or pattern-matching is also closer to how Node's
require
extensions work.