{"action":"opened","number":965,"pull_request":{"url":"https://api.github.com/repos/jantimon/html-webpack-plugin/pulls/965","id":192226031,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMjI2MDMx","html_url":"https://github.com/jantimon/html-webpack-plugin/pull/965","diff_url":"https://github.com/jantimon/html-webpack-plugin/pull/965.diff","patch_url":"https://github.com/jantimon/html-webpack-plugin/pull/965.patch","issue_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/issues/965","number":965,"state":"open","locked":false,"title":"Timestamp based check for changes to HTML template","user":{"login":"dwoznicki","id":13933454,"node_id":"MDQ6VXNlcjEzOTMzNDU0","avatar_url":"https://avatars2.githubusercontent.com/u/13933454?v=4","gravatar_id":"","url":"https://api.github.com/users/dwoznicki","html_url":"https://github.com/dwoznicki","followers_url":"https://api.github.com/users/dwoznicki/followers","following_url":"https://api.github.com/users/dwoznicki/following{/other_user}","gists_url":"https://api.github.com/users/dwoznicki/gists{/gist_id}","starred_url":"https://api.github.com/users/dwoznicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwoznicki/subscriptions","organizations_url":"https://api.github.com/users/dwoznicki/orgs","repos_url":"https://api.github.com/users/dwoznicki/repos","events_url":"https://api.github.com/users/dwoznicki/events{/privacy}","received_events_url":"https://api.github.com/users/dwoznicki/received_events","type":"User","site_admin":false},"body":"As of webpack version 4, `isCompilationCached` no longer appears to be a reliable method of checking whether a template file has been changed. Instead, we can check `compilation.fileTimestamps` to see when the template file was last modified.\r\nFor a 25 html page project, I've found this change reduces the rebuild time from ~3000ms to ~700ms ins `--watch` mode.\r\n\r\n**NOTE**: this commit fails the build test because `WebpackRecompilationSimulator.simulateFileChange`  does not change the `compilation.fileTimestamps` object.\r\nOne way to solve this might be to have `simulateFileChange` write to the source file and then immediately revert the changes. Another might be to initialize the `HtmlWebpackPlugin` with the temp file as the template instead of the source file. Both require making changes to [webpack-recompilation-simulator](https://github.com/jantimon/webpack-recompilation-simulator), which I'm not sure how to build.\r\nIn practice, I've found this commit to work as expected with `webpack --watch`.","created_at":"2018-06-03T01:48:56Z","updated_at":"2018-06-03T01:48:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/pulls/965/commits","review_comments_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/pulls/965/comments","review_comment_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/issues/965/comments","statuses_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/statuses/e07e3a9c1969e6e5eb93fb5d21ae86b357f9e2cc","head":{"label":"dwoznicki:bugfix/needs-rebuild","ref":"bugfix/needs-rebuild","sha":"e07e3a9c1969e6e5eb93fb5d21ae86b357f9e2cc","user":{"login":"dwoznicki","id":13933454,"node_id":"MDQ6VXNlcjEzOTMzNDU0","avatar_url":"https://avatars2.githubusercontent.com/u/13933454?v=4","gravatar_id":"","url":"https://api.github.com/users/dwoznicki","html_url":"https://github.com/dwoznicki","followers_url":"https://api.github.com/users/dwoznicki/followers","following_url":"https://api.github.com/users/dwoznicki/following{/other_user}","gists_url":"https://api.github.com/users/dwoznicki/gists{/gist_id}","starred_url":"https://api.github.com/users/dwoznicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwoznicki/subscriptions","organizations_url":"https://api.github.com/users/dwoznicki/orgs","repos_url":"https://api.github.com/users/dwoznicki/repos","events_url":"https://api.github.com/users/dwoznicki/events{/privacy}","received_events_url":"https://api.github.com/users/dwoznicki/received_events","type":"User","site_admin":false},"repo":{"id":135640910,"node_id":"MDEwOlJlcG9zaXRvcnkxMzU2NDA5MTA=","name":"html-webpack-plugin","full_name":"dwoznicki/html-webpack-plugin","owner":{"login":"dwoznicki","id":13933454,"node_id":"MDQ6VXNlcjEzOTMzNDU0","avatar_url":"https://avatars2.githubusercontent.com/u/13933454?v=4","gravatar_id":"","url":"https://api.github.com/users/dwoznicki","html_url":"https://github.com/dwoznicki","followers_url":"https://api.github.com/users/dwoznicki/followers","following_url":"https://api.github.com/users/dwoznicki/following{/other_user}","gists_url":"https://api.github.com/users/dwoznicki/gists{/gist_id}","starred_url":"https://api.github.com/users/dwoznicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwoznicki/subscriptions","organizations_url":"https://api.github.com/users/dwoznicki/orgs","repos_url":"https://api.github.com/users/dwoznicki/repos","events_url":"https://api.github.com/users/dwoznicki/events{/privacy}","received_events_url":"https://api.github.com/users/dwoznicki/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dwoznicki/html-webpack-plugin","description":"Simplifies creation of HTML files to serve your webpack bundles","fork":true,"url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin","forks_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/forks","keys_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/teams","hooks_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/hooks","issue_events_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/events","assignees_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/tags","blobs_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/languages","stargazers_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/stargazers","contributors_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/contributors","subscribers_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/subscribers","subscription_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/subscription","commits_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/merges","archive_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/downloads","issues_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/labels{/name}","releases_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/dwoznicki/html-webpack-plugin/deployments","created_at":"2018-05-31T22:23:31Z","updated_at":"2018-05-31T22:23:34Z","pushed_at":"2018-06-03T01:18:45Z","git_url":"git://github.com/dwoznicki/html-webpack-plugin.git","ssh_url":"git@github.com:dwoznicki/html-webpack-plugin.git","clone_url":"https://github.com/dwoznicki/html-webpack-plugin.git","svn_url":"https://github.com/dwoznicki/html-webpack-plugin","homepage":"","size":970,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jantimon:master","ref":"master","sha":"1b55838758ff64333fbef1472b849e20877de0c4","user":{"login":"jantimon","id":4113649,"node_id":"MDQ6VXNlcjQxMTM2NDk=","avatar_url":"https://avatars2.githubusercontent.com/u/4113649?v=4","gravatar_id":"","url":"https://api.github.com/users/jantimon","html_url":"https://github.com/jantimon","followers_url":"https://api.github.com/users/jantimon/followers","following_url":"https://api.github.com/users/jantimon/following{/other_user}","gists_url":"https://api.github.com/users/jantimon/gists{/gist_id}","starred_url":"https://api.github.com/users/jantimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jantimon/subscriptions","organizations_url":"https://api.github.com/users/jantimon/orgs","repos_url":"https://api.github.com/users/jantimon/repos","events_url":"https://api.github.com/users/jantimon/events{/privacy}","received_events_url":"https://api.github.com/users/jantimon/received_events","type":"User","site_admin":false},"repo":{"id":22744595,"node_id":"MDEwOlJlcG9zaXRvcnkyMjc0NDU5NQ==","name":"html-webpack-plugin","full_name":"jantimon/html-webpack-plugin","owner":{"login":"jantimon","id":4113649,"node_id":"MDQ6VXNlcjQxMTM2NDk=","avatar_url":"https://avatars2.githubusercontent.com/u/4113649?v=4","gravatar_id":"","url":"https://api.github.com/users/jantimon","html_url":"https://github.com/jantimon","followers_url":"https://api.github.com/users/jantimon/followers","following_url":"https://api.github.com/users/jantimon/following{/other_user}","gists_url":"https://api.github.com/users/jantimon/gists{/gist_id}","starred_url":"https://api.github.com/users/jantimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jantimon/subscriptions","organizations_url":"https://api.github.com/users/jantimon/orgs","repos_url":"https://api.github.com/users/jantimon/repos","events_url":"https://api.github.com/users/jantimon/events{/privacy}","received_events_url":"https://api.github.com/users/jantimon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jantimon/html-webpack-plugin","description":"Simplifies creation of HTML files to serve your webpack bundles","fork":false,"url":"https://api.github.com/repos/jantimon/html-webpack-plugin","forks_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/forks","keys_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/teams","hooks_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/hooks","issue_events_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/events","assignees_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/tags","blobs_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/languages","stargazers_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/stargazers","contributors_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/contributors","subscribers_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/subscribers","subscription_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/subscription","commits_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/merges","archive_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/downloads","issues_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/jantimon/html-webpack-plugin/deployments","created_at":"2014-08-08T03:19:15Z","updated_at":"2018-06-03T01:36:07Z","pushed_at":"2018-06-01T22:08:36Z","git_url":"git://github.com/jantimon/html-webpack-plugin.git","ssh_url":"git@github.com:jantimon/html-webpack-plugin.git","clone_url":"https://github.com/jantimon/html-webpack-plugin.git","svn_url":"https://github.com/jantimon/html-webpack-plugin","homepage":"","size":970,"stargazers_count":5793,"watchers_count":5793,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":666,"mirror_url":null,"archived":false,"open_issues_count":46,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":666,"open_issues":46,"watchers":5793,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jantimon/html-webpack-plugin/pulls/965"},"html":{"href":"https://github.com/jantimon/html-webpack-plugin/pull/965"},"issue":{"href":"https://api.github.com/repos/jantimon/html-webpack-plugin/issues/965"},"comments":{"href":"https://api.github.com/repos/jantimon/html-webpack-plugin/issues/965/comments"},"review_comments":{"href":"https://api.github.com/repos/jantimon/html-webpack-plugin/pulls/965/comments"},"review_comment":{"href":"https://api.github.com/repos/jantimon/html-webpack-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jantimon/html-webpack-plugin/pulls/965/commits"},"statuses":{"href":"https://api.github.com/repos/jantimon/html-webpack-plugin/statuses/e07e3a9c1969e6e5eb93fb5d21ae86b357f9e2cc"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":41,"deletions":7,"changed_files":1}}
{"actor":{"display_login":"dwoznicki"}}