0.5.4 • Published 8 years ago

bundle-node-style-loader v0.5.4

Weekly downloads
3
License
-
Repository
github
Last release
8 years ago

bundle loader for webpack with node-style callback signature

Identical to bundle-loader but has node-style callback signatures.

Installation

npm install bundle-node-style-loader

Usage

import loadThing from 'bundle?lazy./thing'

// instead of the bundle loader api:
loadThing((thing) => {})

// you get node-style callbacks:
loadthing((err, thing) => {})

It always sends null for the error, but this way it pairs well with other libs, like, say ... React Router:

import loadInvoices from 'bundle?lazy!./Invoices'
<Route path="/stuff" getComponent={loadInvoices}/>

License

MIT (http://www.opensource.org/licenses/mit-license.php)