(event = {})
| 998 | } |
| 999 | |
| 1000 | reload(event = {}) { |
| 1001 | let { subtype, files, build } = event; |
| 1002 | if (build?.templates) { |
| 1003 | build.templates = build.templates |
| 1004 | .filter(entry => { |
| 1005 | if(!this.options.domDiff) { |
| 1006 | // Don’t include any files if the dom diffing option is disabled |
| 1007 | return false; |
| 1008 | } |
| 1009 | |
| 1010 | // Filter to only include watched templates that were updated |
| 1011 | return (files || []).includes(entry.inputPath); |
| 1012 | }); |
| 1013 | } |
| 1014 | |
| 1015 | this.sendUpdateNotification({ |
| 1016 | type: "eleventy.reload", |
| 1017 | subtype, |
| 1018 | files, |
| 1019 | build, |
| 1020 | }); |
| 1021 | } |
| 1022 | } |
| 1023 | |
| 1024 | module.exports = EleventyDevServer; |
no test coverage detected