1 | const SpeedMeasurePlugin = require(".");
|
2 | const smp = new SpeedMeasurePlugin();
|
3 |
|
4 | module.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 | };
|