lil5 :golang: ๐ŸŒฑ · @lil5
110 followers · 1389 posts · Server fosstodon.org

youtube.com/watch?v=H91aqUHn8s

I finally managed to get working with without using

This was the only resource that actually worked

#nodejs #typescript #CommonJS

Last updated 1 year ago

ndubien · @ndubien
77 followers · 76 posts · Server fosstodon.org

As supporting both and can be wrongly done in a thousand ways, I published why and how we achieved that on fast-check.

This article is a follow-up of issues reported via from @bluwy and fixed thank to @AndaristRake. As making the package right was not an easy game at first glance, I thought that a how-we-do article could help other .

fast-check.dev/blog/2023/09/04

#CommonJS #esmodules #javascript #opensource #publint #maintainers

Last updated 1 year ago

Davide Bucci · @davbucci
148 followers · 260 posts · Server mastodon.sdf.org

@GabeMoralesVR I am a complete newbie of Javascript. Modules have created a lot of difficulties as I do not yet understand how they work and the documentation is confusing as some Emscripten exemples refer to whereas browsers prefer .

#CommonJS #es6

Last updated 1 year ago

In 2009, was exactly what needed. The group took a tough problem and forced through a solution that continues to be used millions of times a day.

But with as the standard and the focus shifting towards cloud primitives โ€” the edge, browsers, and compute โ€” and CommonJS simply doesnโ€™t cut it. ESM is a better solution for developers, as they can write browser-compliant code โ€” and for users who get a better end experience.

deno.com/blog/commonjs-is-hurt

#webdev #serverless #esm #javascript #CommonJS

Last updated 1 year ago

Axel Rauschmayer · @rauschma
4225 followers · 2214 posts · Server fosstodon.org
Luca · @scakko
2 followers · 13 posts · Server mastodon.uno

and that was a great closing talk @NicoloRibaudo ! thanks for sharing with us all the difficulties and complexities of maintaining and evolving , migrating from to

#jsday #babel #CommonJS #esm

Last updated 1 year ago

Eric Bednarz · @generic
15 followers · 26 posts · Server ruhr.social

I'm playing with , so I'm also working in a container for the first time in ages, and whoop whoop, integrated with .

After all the , and crap of my latter working days, I had completely forgotten that writing tests does not actually have to suck.

Eleventy is nice, but after also using for the first time in said ages, that makes me a very ๐Ÿ˜ž ๐Ÿผ

#eleventy #nodejs #testing #tap #jest #mocha #jasmine #CommonJS

Last updated 1 year ago

StephOne · @sirber
238 followers · 2476 posts · Server fosstodon.org

is really a mess, with , and . It's like a dinosaur trying to be pretty.

#nodejs #CommonJS #esm #typescript

Last updated 1 year ago

Axel Rauschmayer · @rauschma
3928 followers · 1497 posts · Server fosstodon.org

2/ If a CommonJS module follows this rule, its exports can be name-imported from ESM modules: 2ality.com/2022/10/commonjs-na

#javascript #CommonJS #esm #nodejs

Last updated 2 years ago

Axel Rauschmayer · @rauschma
3928 followers · 1497 posts · Server fosstodon.org

1/ Happy to see that ESM modules have become popular in current code bases (*):
โ€“ Mostly ESM: 68%
โ€“ Mostly CommonJS: 17%
โ€“ A mix: 12%
โ€“ (No answer: 3%)

In my own (relatively simple) ESM-based Node.js projects I was delighted that I usually couldnโ€™t even tell if a dependency was ESM or CommonJS.

(*) fosstodon.org/@rauschma/109824

#javascript #CommonJS #esm #nodejs

Last updated 2 years ago

Evert Pot · @evert
425 followers · 178 posts · Server indieweb.social

Anyone know something about ESM, CommonJS, Typescript and how they interact?

Stuck on a problem, posted on Stack overflow:

stackoverflow.com/questions/75

#CommonJS #esm #typescript #node

Last updated 2 years ago

baspeeters :debian: · @baspeeters
15 followers · 32 posts · Server fosstodon.org

Today I was navigating many different build tools and methods on how to publish a single package to while also keeping compatibility with and and bundling it with minified versions.

Finally settled on a solution with by looking at many examples I had found using advanced search and this "Awesome TypeScript" catalogue: github.com/dzharii/awesome-typ

#typescript #npm #esm #CommonJS #rollup #github

Last updated 2 years ago

· @linkdrop
45 followers · 1816 posts · Server botsin.space
netico · @netico
249 followers · 1766 posts · Server nebbia.fail
ar.al๐ŸŒป · @aral
21222 followers · 19353 posts · Server mastodon.ar.al

CommonJS โ†’ ECMAScript Modules (ESM) in Node.js

I hope this post with my experiences from yesterdayโ€™s refactor are helpful for you if and when you undertake a similar task.

ar.al/2021/01/27/commonjs-to-e

#javascript #js #nodejs #ECMAScriptModules #esm #CommonJS

Last updated 4 years ago