-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Is your request related to a specific problem you're having?
I'm always frustrated when starting a project, I don't want to set up a whole build chain and just want to get started:
import highlight from './node_modules/highlight.js/lib/core.js'
And I get an error Error: 'default' is not exported by /node_modules/highlight.js/lib/core.js
...
The solution you'd prefer / feature you'd like to see added...
I'd much rather prefer having standard ES6 modules in the npm package, and being able to use them as advertised in the README.md
.
Any alternative solutions you considered...
s/module.exports =/export default/
on the node_modules/highlight.js/
files, but that's not very convenient.
Additional context...
Support for ESM has landed in Node.js current and LTS lines recently, with features such as Conditional Exports (useful in case we want to keep the CJS version around, still required for Node.js v10 support).
Having ESM files would also make the library compatible with Deno for free, which would be nice.