It creates objects for the import, but when accessing it it throws the error Cannot read properties of undefined (reading 'getSelf')
from line in the getter:
let moduleRoot = window.moduleSpace[moduleName].getSelf;
So it seems like it thinks it’s there, but it hasn’t actually loaded in at all.
Short-term, a more useful error message would be useful for creators. But ideally, it would actually load in the import when createPerchanceTree is called.
Yes, it works fine by the looks of it. 👍 I’ve integrated it into my createPerchanceTree version too.
I wasn’t sure if I was doing it right, but it did work anyway, so I left it at that. I know I’m playing with fire doing stuff like this but it’s either that or sitting on my hands doing nothing. I find it more interesting trying to do this stuff myself. And I always chat to you about it here anyway, to find out if there’s a way I’m “supposed” to do it, or if there’s just no official capability yet.
That’s how I even found out about that importer. I just needed it extended to fit my needs.
I have also read through both of those, so I’m up to speed. There’s just a lot of stuff the engine can do, just not through official means. And I like to dance on the edge 😜
I really love how you just dig in and solve the problems yourself - this is a very useful trait to have in life. So long as you let me know so I can create an “official” way I’m happy 😅 Thanks for pushing at the edges of the engine - it’s very helpful! I’m going to switch https://perchance.org/dynamic-import-plugin to use the new recursive import code now.
It’s nice you’re cool with it. I could imagine someone else just being annoyed–this is better I think 😁
Great, I’ve updated my createPerchanceTree with that now 👍