We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The HTML output has an invalid doctype line like this:
<!DOCTYPE >
This happens even with an extremely minimal configuration file, see below.
x
[ ]
Filling out the following details about bugs will help us solve your issue sooner.
slackhq/csp-html-webpack-plugin version: 5.1.0
node version: v22.5.1
OS version(s): Arch Linux
$ git clone https://github.com/ttencate/csp-html-webpack-plugin_doctype_repro.git $ cd csp-html-webpack-plugin_doctype_repro $ yarn install $ ./node_modules/.bin/webpack $ head -n1 dist/index.html
<!DOCTYPE html>
package.json
{ "name": "repro", "version": "1.0.0", "main": "index.js", "license": "MIT", "devDependencies": { "csp-html-webpack-plugin": "^5.1.0", "html-webpack-plugin": "^5.6.0", "webpack": "^5.94.0", "webpack-cli": "^5.1.4" } }
webpack.config.js
const CspHtmlWebpackPlugin = require('csp-html-webpack-plugin') const HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { mode: 'development', plugins: [ new HtmlWebpackPlugin(), new CspHtmlWebpackPlugin(), ], }
src/index.js
// Empty.
The text was updated successfully, but these errors were encountered:
The cause seems to be somewhere in cheerio or one of its dependencies: cheeriojs/cheerio#4068
Sorry, something went wrong.
Pinning cheerio to 1.0.0-rc.10 fixed this for me (it was working, then I updated some deps and rolled them back till it worked again)
cheerio
1.0.0-rc.10
No branches or pull requests
Description
The HTML output has an invalid doctype line like this:
<!DOCTYPE >
This happens even with an extremely minimal configuration file, see below.
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
slackhq/csp-html-webpack-plugin version: 5.1.0
node version: v22.5.1
OS version(s): Arch Linux
Steps to reproduce:
Expected result:
<!DOCTYPE html>
Actual result:
<!DOCTYPE >
Attachments:
package.json
webpack.config.js
src/index.js
// Empty.
The text was updated successfully, but these errors were encountered: