fresh-require

1.0.3 • Public • Published

fresh-require

Bypass the require cache when requiring a module – works with both node and browserify.

Usage

NPM

fresh(module, require)

Where module is the name of the module you're requiring, as you would normally pass to require. require should be your file's local require function.

To use this package properly with browserify, you need to include fresh-require/transform as a transform:

browserify -t fresh-require/transform ./index.js

Then you should be able to use the package as normal:

var fresh = require('fresh-require')
 
var async1 = require('async')
var async2 = fresh('async', require)

License

MIT. See LICENSE.md for details.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    3,167
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    3,167
  • 1.0.2
    0
  • 1.0.1
    1
  • 1.0.0
    1

Package Sidebar

Install

npm i fresh-require

Weekly Downloads

3,169

Version

1.0.3

License

MIT

Last publish

Collaborators

  • hughsk