When working with ES modules and JavaScript module import statements in the browser, you’ll need to explicitly tell the browser that a script is module. You’ll need to work with one or the other, and if you want import to be the one, than you’ll need to replace your require statements with matching import‘s. This is most likely triggered when a file tries to use both import and require module patterns, which isn’t possible. Once this is in place, you may come across another error: ReferenceError: require is not defined You may need to adjust the way your scripts work though, because you’ll need to treat your file as an actual module that exports functionality to consuming files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |