+ 1
Cannot use import outside a module. How to solve this error in js while using import and export but works for require why?
2 ответов
0
I have the same problem. My JavaScript is run in a web browser instead of through nodejs. I get the same error message in Edge.
I'm trying to split up a .js file into multiple files without adding script elements to the corresponding HTML. I just want to have JavaScript define what dependencies it has without using a bundling tool.