ParkeTgo icon

Untitled

ParkeTgo | PRO | 09/05/18 01:34:33 PM UTC | 0 ⭐ | 220 👁️ | Never ⏰ | []
JavaScript |

650 B

|

None

|

0 👍

/

0 👎

const MyPlugin = {
    apply: compiler => {
        compiler.hooks.compilation.tap("MyPlugin", compilation => {
            compilation.hooks.succeedModule.tap("MyPlugin", module => {
                if (module.rawRequest && module.rawRequest.startsWith("pure-loader")) {
                    Array.from(compilation.fileTimestamps.keys())
                        .forEach(rs => {
                            if (typeof rs === "string")
                                compilation.fileTimestamps.set(rs, fs.statSync(rs).mtime);
                        });
                    });
                }
                return null;
            });
        });
    }
};

Comments