A babel plugin to support the import
statement anywhere that statements are valid, and transform
those statements to commonjs imports.
Adapted from a comment by @nicolo-ribaudo.
npm install -D babel-plugin-import-everywhere
{
"plugins": ["babel-plugin-import-everywhere"]
}
npm run build
Outputs a commonjs-compatible bundle to dist/index.js
.
npm test
Merging to master will automatically publish the package if commits with non-trivial changes have been introduced (per commit conventions).