UNPKG

406 BJavaScriptView Raw
1const SpeedMeasurePlugin = require(".");
2const smp = new SpeedMeasurePlugin();
3
4module.exports = neutrino => {
5 const origConfig = neutrino.config;
6 const wrappedConfig = smp.wrap(origConfig.toConfig());
7 neutrino.config = new Proxy(origConfig, {
8 get(target, property) {
9 if (property === "toConfig") {
10 return () => wrappedConfig;
11 }
12 return target[property];
13 },
14 });
15};