mirror of
https://github.com/log4js-node/log4js-node.git
synced 2025-12-08 19:26:01 +00:00
16 lines
348 B
JavaScript
16 lines
348 B
JavaScript
'use strict';
|
|
|
|
const sandbox = require('sandboxed-module');
|
|
|
|
sandbox.configure({
|
|
sourceTransformers: {
|
|
nyc: function (source) {
|
|
if (this.filename.indexOf('node_modules') > -1) {
|
|
return source;
|
|
}
|
|
const nyc = new (require('nyc'))();
|
|
return nyc.instrumenter().instrumentSync(source, this.filename);
|
|
}
|
|
}
|
|
});
|