tsmx / node-commonjs-to-esm

Example showing how to migrate an existing NodeJS project from CommonJS to ESM

Home Page:https://tsmx.net/convert-existing-nodejs-project-from-commonjs-to-esm/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node-commonjs-to-esm

Example showing how to migrate an existing NodeJS project from CommonJS to ESM

This is the accompanying example project for the CommonJS-to-ESM migration guide.

To follow along with the guide, clone this repo an inspect the branches for CommonJS and ESM.

# clone the example project
git clone https://github.com/tsmx/node-commonjs-to-esm.git

# install needed dependencies
cd node-commonjs-to-esm
npm install

# check out/switch to the original CommonJS project
git checkout commonjs

# check out/switch to the migrated ESM project
git checkout esm

About

Example showing how to migrate an existing NodeJS project from CommonJS to ESM

https://tsmx.net/convert-existing-nodejs-project-from-commonjs-to-esm/

License:MIT License


Languages

Language:JavaScript 100.0%