{"library":"import-fresh","type":"library","category":null,"description":"Import-fresh bypasses the Node.js module cache to force a fresh import of a module, useful for testing and hot-reloading scenarios. Version 4.0.0 (latest stable, released 2025) requires Node.js ≥22.15 due to its use of ESM module loader hooks. Unlike older cache-clearing approaches (e.g., delete require.cache), import-fresh works with ESM and is the only maintained solution for Node's native ES module system. It uses a unique cache-busting URL per call, which grows memory over time (intended for development only). Sindre Sorhus maintains it with monthly releases.","language":"javascript","status":"active","version":"4.0.0","tags":["javascript","import","require","cache","uncache","uncached","module","fresh","bypass","typescript"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install import-fresh","imports":["import createImportFresh from 'import-fresh'","const importFresh = createImportFresh(import.meta.url);\nconst mod = await importFresh('./foo.js')","import createImportFresh from 'import-fresh'"]},{"cmd":"yarn add import-fresh","imports":[]},{"cmd":"pnpm add import-fresh","imports":[]}],"homepage":"https://github.com/sindresorhus/import-fresh#readme","github":"https://github.com/sindresorhus/import-fresh","docs":null,"changelog":null,"pypi":null,"npm":"import-fresh","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}