Answers for "script.js:1 uncaught syntaxerror: cannot use import statement outside a modul"

19

Cannot use import statement outside a module

<script type="module" src="main.js"></script>
Posted by: Guest on November-11-2020
7

cannot use import statement outside a module

//Add type=module to your index.js script tag (not just the package script tag)

<script type="module" src="./index.js"></script>
Posted by: Guest on September-26-2021

Code answers related to "script.js:1 uncaught syntaxerror: cannot use import statement outside a modul"

Code answers related to "Javascript"

Browse Popular Code Answers by Language