I saw your post on Reddit. This looks really cool! I can't wait to install it when I get off work.
Recent community posts
I was able to fix the "Uncaught ReferenceError: a is not defined" message by adding 'const' to the forloop on line 954. So it's now, for (const a in attrs). type="module" can now be added to the main.js <script> tag and static imports work. Using dynamic imports is no longer needed. I'll add a new pastebin example.
I finally found a working solution using dynamic imports. For some reason adding type="module" to <script src="main.js"... breaks at line 954. Using dynamic imports skips the need for type="module" and allows imported modules to be used. All you need to do is all 'async' to the IIFE in main.js then dynamically import the modules. I have added a simple pastebin example moving 'gametitle' to another file.
I don't know the limitations of this solution, but it has been working so far. I was able to create a sound.js file and move the sfx constant into it.
My main.js file is getting pretty big, is there a way to split this into multiple files? I tried exporting and importing modules but this caused an "Uncaught ReferenceError: a is not defined" error.
Update: Error was fixed by adding const to the forloop on line 954. See post below for more details.