ES6 module Import giving "Uncaught SyntaxError: Unexpected identifier"
From what I can see you are trying to load the file menu.module.js
while it's actually named menu.js
.
PS: From what I recall you could also drop the .js
from the import statement.
As @Bergi mentioned in the comment, adding type="module"
to the main.js
import line in the HTML solved the issue. All is working now. I.e.
<script type="module" src="assets/js/main.js">
Thanks to all of you who responded and tried to help.