I used your action and I like this way of doing it. It makes it very dynamic, since any draft with the specified tag(s) will be automatically included in script execution. It still seems pretty fast, even when including large libraries.
I tested it with the minified version if moment.js loaded into a draft. I can use the
moment() functions with no issue in my scripts.
The only thing that would be nice is being able to trace errors a little better. Using the code from @draft8 earlier in the thread, the
e.line property for the error message seems to include both the current script as well as the libraries put together. It would be great to know which script or function threw the error.