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.

ECMAScript modules support (and docs)

See original GitHub issue

Is your feature request related to a problem? Please describe.

Most of the examples in the README.md is using CommonsJS require/export. Some docs use ECMAScript modules import/export

Considering Node.js 10 has reached EOL, and that Jest 27 has released, the whole community is rallying around ESM. I think it would make sense to update all documents to be in ESM rather than CJS.

Edit: It seems jest-playwright does not support e.g. jest-playwright.config.js to be written in ESM. So the request is to support ESM. See below.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
mmarkelovcommented, Jun 9, 2021

@thernstig i just put help wanted label for this task to let developers that they can start their contribution from this issue. But i suppose that it won’t help) I just try to find out some time on this task in a couple weeks

0reactions
thernstigcommented, Nov 18, 2021

@mxschmitt then I think that the README.md should be updated:

It’s more flexible, lightweight, optimized for Playwright, and has TypeScript support out of the box. This doesn’t mean, that we stop with maintaining this package.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ECMAScript modules | Node.js v19.3.0 Documentation
Node.js fully supports ECMAScript modules as they are currently specified and provides interoperability between them and its original module format, ...
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 - Jest
Jest ships with experimental support for ECMAScript Modules (ESM). ... at type in package.json or .mjs files), see their docs for details.
Read more >
Documentation - ECMAScript Modules in Node.js - TypeScript
For the last few years, Node.js has been working to support running ECMAScript modules (ESM). This has been a very difficult feature to...
Read more >
16. Modules - Exploring JS
ES6 is the first time that JavaScript has built-in modules. ES6 modules are stored in files. ... ES6 modules support cyclic dependencies automatically....
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