jantimon/html-webpack-plugin

Plugin option `title` doesn't work

megFree opened this issue ยท 1 comments

Current behaviour ๐Ÿ’ฃ

Plugin option title doesn't insert new title for output html template.

Expected behaviour โ˜€๏ธ

Plugin adds provided title tag into resulting html file.

Reproduction Example ๐Ÿ‘พ

Github repo

  1. Clone
  2. npm install
  3. npm start
  4. Check out result html

Environment ๐Ÿ–ฅ

Node.js v16.6.2
win32 10.0.19043
npm 7.20.3

npm ls webpack

code@1.0.0 C:\my_projects\webpack-demo-app
+-- css-loader@6.7.1
| `-- webpack@5.74.0 deduped
+-- html-webpack-plugin@5.5.0
| `-- webpack@5.74.0 deduped
+-- sass-loader@13.1.0
| `-- webpack@5.74.0 deduped
+-- style-loader@3.3.1
| `-- webpack@5.74.0 deduped
+-- webpack-cli@4.10.0
| +-- @webpack-cli/configtest@1.2.0
| | `-- webpack@5.74.0 deduped
| `-- webpack@5.74.0 deduped
`-- webpack@5.74.0
  `-- terser-webpack-plugin@5.3.6
    `-- webpack@5.74.0 deduped

npm ls html-webpack-plugin

code@1.0.0 C:\my_projects\webpack-demo-app
`-- html-webpack-plugin@5.5.0

I believe you're missing this bit in your html file <title><%= htmlWebpackPlugin.options.title %></title> as stated in writing-your-own-templates