Skip to content

kingback/require-esm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

require-esm

Use default while requiring an esmodule

How to use

// a.js
export default 1;

// b.js
import req from 'require-esm';
// import a from 'a'
// const a = require('a').default;
const a = req(require('a'));
export default { a, b: 2 }

Releases

No releases published

Packages

No packages published