Skip to content
A sample package compatible with both ES Modules and CommonJS Modules
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cjs
src
test
.babelrc
.gitignore
README.md
index.js
index.mjs
package-lock.json
package.json

README.md

esm-cjs-compat-package

A sample package compatible with both ES Modules and CommonJS Modules

How to build

$ npm run build

How to use

npm install this package into your local and

// from ESM
import foo from 'esm-cjs-compat-pacakge';
console.log(foo); // foo!

or

// from CJS
const foo = require('esm-cjs-compat-pacakge');
console.log(foo.default); // foo!
You can’t perform that action at this time.