question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add posibility to use native es6 import

See original GitHub issue

Is 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:open
  • Created 6 years ago
  • Reactions:7
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
habibmousavicommented, Jun 16, 2022

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.

1reaction
Manvielcommented, Jun 15, 2020

I also have similar issue. When using <script> i have an error Unexpected token ‘{’

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found