Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
- });
- });
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment