News for hackers. Stuff that matters.
Re:Cherry: ClojureScript to ES6 Compiler by wiredearp on Tuesday November 01, 2022 @03:55PM (#33426603)
ES6 is compatible with Node out of the box.

You can `import` and `export` just like in the browser (and in TypeScript) as long as your files come with the `.mjs` extension. Cherry adds this extension by default, so I imagine it comes with the server in mind.

You can also keep the `.js` extension and configure this behavior in the `package.json` to run the same files both client- and serverside.

Some libraries still expect to run as CommonJS, but then you might find an "es" version if you poke around in their repositories.

There are no comments on this comment yet.