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.

ECMAScript module support?

See original GitHub issue

Does this support the new-style ES modules? (ie. "type": "module" in package.json etc.)

I have a Node.js TypeScript project that compiles to native ES modules (recently migrated, due to depending on some other libraries that are now only shipped as ES modules), and I can’t seem to be able to import any of the project’s modules in a notebook (inside that project), whichever way I try.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:7
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

DonJayamannecommented, Oct 13, 2021

Not yet, but will be supporting that soon. Thanks for trying this extension and submitting the feature request (plan is to get it in some time next week).

jaenscommented, Nov 4, 2021

@ilyabo Ah, I guess the notebook extension’s transpiler is also changing import() function calls into require() internally…

In this case you are currently probably out of luck, and this issue is indeed a blocker for importing any ES modules.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ECMAScript modules | Node.js v19.3.0 Documentation
js fully supports ECMAScript modules as they are currently specified and provides interoperability between them and its original module format, CommonJS.
Read more >
JavaScript modules - MDN Web Docs
This guide gives you all you need to get started with JavaScript module syntax.
Read more >
ECMAScript Modules - webpack
ECMAScript Modules (ESM) is a specification for using Modules in the Web. It's supported by all modern browsers and the recommended way of...
Read more >
Understanding TypeScript 4.7 and ECMAScript module support
Part of ECMAScript module support is the ability to specify the module type of a file based on the file suffix. If you...
Read more >
ECMAScript Modules - Jest
Jest ships with experimental support for ECMAScript Modules (ESM). The implementation may have bugs and lack features. For the latest status ...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found