Add posibility to use native es6 import
See original GitHub issueIs it possible to add such usage way as native imports?
When I use webpack this works great:
import SimpleBar from './simplebar';
But when I use native import with <script type="module"> I get
Uncaught SyntaxError: The requested module does not provide an export named ‘default’
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How to Import Native Modules using the new ES6 ... - Medium
I came across a use case of using the newer import/export syntax in JavaScript where I was not able to import a native...
Read more >import - JavaScript - MDN Web Docs - Mozilla
Given a value named myExport which has been exported from the module my-module either implicitly as export * from 'another.js' ) or explicitly ......
Read more >Using ES modules in browsers with import-maps
In this post, we'll go through a few basic examples of how ES modules are used and then explore the possibility of using...
Read more >Using Node.js require vs. ES6 import/export - Stack Overflow
Also, the Require module system isn't standard based. It's is highly unlikely to become standard now that ES6 modules exist. In the future...
Read more >JavaScript ES6 Modules Import Export
One possibility to get away with it is to import them as an object. When we do it like that, we assign a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For the sake of a double check, let’s review my case. I as well got an Unexpected token ‘{’ when using Simplebar. When I reviewed my code, I came to notice that I had used simplebar.min.css in my script tag and not simplebar.min.js. Please double check that to make sure this simple typo is not your problem as well.
I also have similar issue. When using <script> i have an error Unexpected token ‘{’