# mjs-require **Repository Path**: mirrors_WebReflection/mjs-require ## Basic Information - **Project Name**: mjs-require - **Description**: Making npm CommonJS modules available in NodeJS - **Primary Language**: Unknown - **License**: WTFPL - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-19 - **Last Updated**: 2026-01-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # mjs-require Making npm CommonJS based modules available in NodeJS ESM. # alternative Use [@std/esm](https://github.com/standard-things/esm) and configure it as such: ```js "@std/esm": { "cjs": true, "esm": "js" } ``` ## How to install You can install it either globally or locally, and use it in latter case via `npm` scripts. ```sh npm install -g mjs-require ``` ## How to use Require the module before launching your ESM based project. ```sh node -r mjs-require --experimental-modules index.mjs ``` ### Why Right now there's no conditional, dynamic, synchronous way to require CJS modules. So now `require` is back. Happy ESM Migration 🎉