#Require local module not working

3 messages · Page 1 of 1 (latest)

prime girder
#

Hello, I am trying to require a local js file and it keeps spitting out this error.

Require stack:``` I found a solution is to change the script's import line from ```<script src="../js/index.js" defer></script>``` to ```<script>require("../js/index.js")</script>``` which solves the issue but I am not able to defer the script load. Is there any way to defer the script load without losing the ability to import local js files
#

never mind i found out a solution to the issue, I made a new js script called scriptLoader.js that I put here <script>require("../js/scriptLoader.js")</script> that just has an window.onload that requires the index.js module

hollow depot
#

This is what defer do