dev-resources.site
for different kinds of informations.
Dual Node TypeScript Packages - The Easy Way
Published at
7/29/2024
Categories
cjs
esm
node
typescript
Author
ragrag
Author
6 person written this
ragrag
open
Well we've all been down that road haven't we? trying to build a Node TypeScript package that supports both ESM/CJS without losing our mind in the process.
I took it upon myself to lose my own mind while keeping you sane π«‘
Introducing moshimosh, The easiest way to bootstrap a Node Hybrid TypeScript package with modern tooling that just works, all you need is
npx moshimosh
You Get
- Hybrid ESM/CJS that just works
- Tests and Coverage with vitest
- Linting/Formatting with Biome
- Linting/Formatting Git Pre-commit hooks
- Documentation generation from your compiled .d.ts with typedoc
- Github action for building and testing
- Github action for updating docs in a GitHub Pages repo
And if i saved you some sanity, please check out the GitHub Repo, all contributions are welcome!
esm Article's
30 articles in total
Bundling without a bundler with esm.sh
read article
Building NPM packages for CommonJS with ESM dependencies
read article
Web Development Without (Build) Tooling
read article
Dual Node TypeScript Packages - The Easy Way
currently reading
Oh CommonJS! Why are you mESMing with me?! Reasons to ditch CommonJS
read article
The Ongoing War Between CJS & ESM: A Tale of Two Module Systems
read article
How I optimized Carousel for EditorJS 2x in size.
read article
Transitioning from CommonJS to ESM
read article
Node.js, TypeScript and ESM: it doesn't have to be painful
read article
Set up Hot Reload for Typescript ESM projects
read article
Set up a Node.js project + TypeScript + Jest using ES Modules
read article
ESM & CJS: The subtle shift in bundlejs' behaviour
read article
Mastering the Art of ESM and CJS Package Handling
read article
Modules & Modules & Modules, Oh My!
read article
How to build TypeScript to ESM and CommonJS
read article
ES Modules & Import Maps: Back to the Future
read article
How to use ESM on the web and in Node.js
read article
Custom ESM loaders: Who, what, when, where, why, how
read article
Fix NX Node executor ERR_REQUIRE_ESM Error
read article
Creating a Node.js module for both CommonJS & ESM consumption
read article
STOP using require() in node backend
read article
JavaScript Module Ecosystem
read article
Declarative database modelling
read article
Expressjs: Javascript written in ECMAScript 2015 (ES6)
read article
How to use ES Modules with Node.js
read article
What does it take to support Node.js ESM?
read article
Build modular app with Alpine.js
read article
TS and ts-jest meet βtypeβ: βmoduleβ
read article
ESM doesn't need to break the ecosystem
read article
constructor() dynamic import()
read article
Featured ones: