Open henrahmagix opened 5 years ago
This is super useful, I think, and would be a great enhancement to this plugin. Let's get this in there after the dependency updates and hopefully we don't see too many collisions with other code that is also coming in.
This PR will need tests written for the use cases this feature presents. If you could provide those tests in your branch, @henrahmagix, that would be super awesome.
Hi,
I wrote this option for my uses, maybe other users would like it too? =)
It allows users with many identical require paths across their files to declare the path once and reference with a name, e.g.
becomes
with options
I've also updated the error message to include the filepath of the include/require, and the top-level filepath at the beginning of the recursion, to aid in debugging when multiple top-level files all include/require the same file, e.g.
for a project structured like so: