active-cache-babel-register
active-cache-babel-register improves performance of babel transpilation using cache actively.
Cache Strategy
- babel finds config files and load these files every startup time, active-cache-babel-register set the config files to cache registry.
- babel-register does not support multi-process cache like cluster/child_process, active-cache-babel-register has 2 cache stores, 1st cache store is original one, 2nd cache store can be used in multi-process
- active-cache-babel-register purges cache if babel-version/.babelrc/package.json/.babelignore and target files are changed
Performance
babel-register
Total duration time: 18170ms
active-cache-babel-register
Total duration time: 5122ms
Usage
usage is almost same to babel-register
.
$ npm install actice-cache-babel-register
$ node --require active-cache-babel-register foo.js