Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 887 Bytes

README.md

File metadata and controls

40 lines (29 loc) · 887 Bytes

reload modules

reload nodejs modules with batchdelcache

Build Status Coverage Status

Installation

# use npm
npm install reload-modules
# or use yarn
yarn add reload-modules

Environment

Node.js 10+

Usage

import Reloader from 'reload-modules';

const reloader = new Reloader({
    fileMap: {
        mod1: 'abcd',
        mod2: 'efcg',
    },
    context: resolve(__dirname, './fixtures'),
    commonRootPath: resolve(__dirname, './fixtures/mainModule.js'),
});

reloader.reload({
    mod1: 'xxxx',
    mod2: 'xxxx',
});