{"action":"opened","issue":{"url":"https://api.github.com/repos/webpack-contrib/html-webpack-plugin/issues/19","repository_url":"https://api.github.com/repos/webpack-contrib/html-webpack-plugin","labels_url":"https://api.github.com/repos/webpack-contrib/html-webpack-plugin/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/webpack-contrib/html-webpack-plugin/issues/19/comments","events_url":"https://api.github.com/repos/webpack-contrib/html-webpack-plugin/issues/19/events","html_url":"https://github.com/webpack-contrib/html-webpack-plugin/issues/19","id":300814996,"number":19,"title":" DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead","user":{"login":"klinki","id":1476175,"avatar_url":"https://avatars3.githubusercontent.com/u/1476175?v=4","gravatar_id":"","url":"https://api.github.com/users/klinki","html_url":"https://github.com/klinki","followers_url":"https://api.github.com/users/klinki/followers","following_url":"https://api.github.com/users/klinki/following{/other_user}","gists_url":"https://api.github.com/users/klinki/gists{/gist_id}","starred_url":"https://api.github.com/users/klinki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klinki/subscriptions","organizations_url":"https://api.github.com/users/klinki/orgs","repos_url":"https://api.github.com/users/klinki/repos","events_url":"https://api.github.com/users/klinki/events{/privacy}","received_events_url":"https://api.github.com/users/klinki/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-27T22:18:34Z","updated_at":"2018-02-27T22:18:34Z","closed_at":null,"author_association":"NONE","body":"Hi guys, \r\nIt is probably not such a big deal, but I'm getting deprecation warnings about `Tapable.plugin` and `Tapable.apply` in latest (by latest I mean version from this repo - `webpack-contrib/html-webpack-plugin`) version of html-webpack-plugin. \r\n\r\n### Error Message & Stack Trace\r\n\r\n```\r\n(node:14872) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead\r\n    at HtmlWebpackPlugin.apply (D:\\work\\personal\\aurelia-finmonitor\\node_modules\\html-webpack-plugin\\index.js:59:12)\r\n    at webpack (D:\\work\\personal\\aurelia-finmonitor\\node_modules\\webpack\\lib\\webpack.js:37:12)\r\n    at processOptions (D:\\work\\personal\\aurelia-finmonitor\\node_modules\\webpack-cli\\bin\\webpack.js:427:16)\r\n    at yargs.parse (D:\\work\\personal\\aurelia-finmonitor\\node_modules\\webpack-cli\\bin\\webpack.js:502:3)\r\n    at Object.parse (D:\\work\\personal\\aurelia-finmonitor\\node_modules\\webpack-cli\\node_modules\\yargs\\yargs.js:539:18)\r\n    at D:\\work\\personal\\aurelia-finmonitor\\node_modules\\webpack-cli\\bin\\webpack.js:212:8\r\n    at Object.<anonymous> (D:\\work\\personal\\aurelia-finmonitor\\node_modules\\webpack-cli\\bin\\webpack.js:504:3)\r\n    at Module._compile (module.js:643:30)\r\n    at Object.Module._extensions..js (module.js:654:10)\r\n    at Module.load (module.js:556:32)\r\n    at tryModuleLoad (module.js:499:12)\r\n    at Function.Module._load (module.js:491:3)\r\n    at Module.require (module.js:587:17)\r\n    at require (internal/module.js:11:18)\r\n    at Object.<anonymous> (D:\\work\\personal\\aurelia-finmonitor\\node_modules\\webpack\\bin\\webpack.js:12:2)\r\n    at Module._compile (module.js:643:30)\r\n    at Object.Module._extensions..js (module.js:654:10)\r\n    at Module.load (module.js:556:32)\r\n    at tryModuleLoad (module.js:499:12)\r\n    at Function.Module._load (module.js:491:3)\r\n    at Function.Module.runMain (module.js:684:10)\r\n    at startup (bootstrap_node.js:187:16)\r\n    at bootstrap_node.js:608:3\r\n(node:14872) DeprecationWarning: Tapable.apply is deprecated. Call apply on the plugin directly instead\r\n    at Object.compileTemplate (D:\\work\\personal\\aurelia-finmonitor\\node_modules\\html-webpack-plugin\\lib\\compiler.js:48:17)\r\n    at D:\\work\\personal\\aurelia-finmonitor\\node_modules\\html-webpack-plugin\\index.js:61:40\r\n    at AsyncParallelHook.eval [as callAsync] (eval at create (D:\\work\\personal\\aurelia-finmonitor\\node_modules\\tapable\\lib\\HookCodeFactory.js:24:12), <anonymous>:13:1)\r\n    at AsyncParallelHook.lazyCompileHook [as _callAsync] (D:\\work\\personal\\aurelia-finmonitor\\node_modules\\tapable\\lib\\Hook.js:35:21)\r\n    at hooks.beforeCompile.callAsync.err (D:\\work\\personal\\aurelia-finmonitor\\node_modules\\webpack\\lib\\Compiler.js:459:20)\r\n    at _fn1.then._result1 (eval at create (D:\\work\\personal\\aurelia-finmonitor\\node_modules\\tapable\\lib\\HookCodeFactory.js:24:12), <anonymous>:14:1)\r\n    at <anonymous>\r\n```\r\n\r\n### Config\r\n\r\nCopy the relevant section from `webpack.config.js`:\r\n\r\n```js\r\nmodule.exports = {\r\n  plugins: [\r\n    new HtmlWebpackPlugin({\r\n      template: 'index.ejs',\r\n      minify: production ? {\r\n        removeComments: true,\r\n        collapseWhitespace: true\r\n      } : undefined,\r\n      metadata: {\r\n        // available in index.ejs //\r\n        title, server, baseUrl\r\n      }\r\n    }),\r\n    ...\r\n  ]\r\n}\r\n```\r\n\r\n## Environment\r\n\r\n```\r\nD:\\work\\personal\\aurelia-finmonitor>node -e \"var os=require('os');console.log('Node.js ' + process.version + '\\n' + os.platform() + ' ' + os.release())\"\r\nNode.js v8.9.4\r\nwin32 10.0.16299\r\n\r\nD:\\work\\personal\\aurelia-finmonitor>npm --version\r\nnpm 5.6.0\r\n\r\nD:\\work\\personal\\aurelia-finmonitor>npm ls webpack\r\naurelia-finmonitor@0.1.0 D:\\work\\personal\\aurelia-finmonitor\r\n`-- (empty)\r\n\r\nD:\\work\\personal\\aurelia-finmonitor>npm ls html-webpack-plugin\r\naurelia-finmonitor@0.1.0 D:\\work\\personal\\aurelia-finmonitor\r\n`-- html-webpack-plugin@2.30.1  invalid\r\n\r\nnpm ERR! invalid: html-webpack-plugin@2.30.1 D:\\work\\personal\\aurelia-finmonitor\\node_modules\\html-webpack-plugin\r\n```\r\n\r\nNote: I'm quite confused about listed `html-webpack-plugin` version. In `package.json` I have `\"html-webpack-plugin\": \"webpack-contrib/html-webpack-plugin\"` \r\n\r\n\r\nI can provide more info if needed."}}
{"actor":{"display_login":"klinki"}}