Support Native ESM
See original GitHub issue- Well aware of note in readme
Due to how ESM loader is used in this library , redefines require, I can’t treat the library as CJS and just import the default and go from there.
Tried to just import directly from src/module.js
, but then it throws the error about loading ES modules. The old “type”:“module” in package.json which was expected but had to try.
This is a nice to have. Just wanted to ask since I’ll have to wrap my project in the ESM loader again. Again, nbd, thanks for the lbirary!
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
"ESM" | Can I use... Support tables for HTML5, CSS3, etc
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Read more >Native ES Modules in Node.js - CodinGame
With the native ESM support in browser, it seems now essential to have it in Node.js . From its beginning, Node.js uses a...
Read more >JavaScript modules - MDN Web Docs
Use of native JavaScript modules is dependent on the import and export statements; these are supported in browsers as shown in the ...
Read more >What does it take to support Node.js ESM? – The Guild
This post is intended to work as a guide to support both CommonJS and ESM and will be updated accordingly in the future...
Read more >ECMAScript modules | Node.js v19.3.0 Documentation
Node.js fully supports ECMAScript modules as they are currently specified and ... Caveat: The ESM load hook and namespaced exports from CommonJS modules...
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
@arackaf I know regex https://xkcd.com/208/ 😄
@PaulSearcy getting this to work with native esm will be a TON of work. Lots and lots and lots of imports will need file extensions added, and I think I’m grabbing some stuff out of node_modules - which may cause this original issue.
I’ll happily accept a PR that makes this work with native esm, I just fear this may be harder than you realize 😐