Bypass the Node.js require cache to reload modules fresh, avoiding stale cached versions. v1.0.3 is the latest stable release; the package is in maintenance mode with no active development. It supports both plain Node and Browserify (via a transform). Unlike other cache-busting utilities, it requires explicitly passing your local require function, making it safe for bundled use. Works by deleting the cached module entry before re-requiring. Current NPM downloads: ~2k/month.
npm install fresh-requireNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates requiring a fresh copy of 'fs' module, bypassing the cache.
Always pass your module's own require: fresh('mod', require).Add '-t fresh-require/transform' to your browserify command.
Consider alternatives like 'clear-module' or 'import-fresh' for ESM support.
Use 'import-fresh' for ESM modules.
Install fresh-require and run browserify with -t: 'browserify -t fresh-require/transform yourfile.js > bundle.js'
Ensure you pass your module's require: fresh('mod', require) (not require() or require.resolve)Verify the module name string matches exactly; e.g., if the package is 'async', use fresh('async', require)Add '-t fresh-require/transform' to browserify command.
No dependency data recorded yet.