Closed kirill-konshin closed 9 years ago
Thanks for making this. I think it works for now. We should definitely implement something like you proposed. We should look into how we can incorporate the existing gulp plugins for that.
:heart: @kirill-konshin
I honestly don't think it is a best way to implement requirejs-text plugin, but it is something close enough. Should be OK for most cases.
As a proposal, you can build a queue of plugins where developers can intercept loading procedure for modules and do what they want with them. For example
each plugin should provide the prefix to
resolveModuleName()
function, this prefix should trigger plugin execution later on indefaultLoader()
. Defaultjs
loader should probably be one of available plugin (maybe last in the queue) so thatdefaultLoader()
will remain abstract.