npm.io
0.1.4 • Published 7 years ago

@hugov/cjs-to-iife

Licence
MIT
Version
0.1.4
Deps
3
Size
2 kB
Vulns
2
Weekly
0
Stars
1

cjs-to-iife

small simple bundler

Examples

const code = require('cjs-to-iife')('./commonjsmodule.js')

Notes

  • returns the promise of a string
  • sets this.exports.name or this.exports.default. Uses the following rollup options
    • format: 'iife'
    • extend: true
    • exports: 'named'
    • name: 'exports'

License

MIT Hugo Villeneuve

Keywords