html-webpack-plugin 5 peer dep
daniele-orlando opened this issue · 5 comments
Please, can you update the package.json definition to support html-webpack-plugin 5?
"peerDependencies": {
"html-webpack-plugin": "^3 || ^4 || ^5"
},
Otherwise:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: app@1.0.20210204-b
npm ERR! Found: html-webpack-plugin@5.0.0
npm ERR! node_modules/html-webpack-plugin
npm ERR! html-webpack-plugin@"5.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer html-webpack-plugin@"^3.0.0 || ^4.0.0" from html-inline-css-webpack-plugin@1.10.0
npm ERR! node_modules/html-inline-css-webpack-plugin
npm ERR! html-inline-css-webpack-plugin@"*" from the root project
Thank you.
As additional detail: using filter option, nothing is injected inside the HTML file, even if the filter does match; but the matched files are deleted from the filesystem.
Hi @daniele-orlando , I've updated the peer dependencies and released a new version to NPM. For the filter issue, can you provide a minimal demo to reproduce that?
As additional detail: using
filteroption, nothing is injected inside the HTML file, even if the filter does match; but the matched files are deleted from the filesystem.
@runjuu I'm experiencing the same problem with the following example:
new HTMLInlineCSSWebpackPlugin({
filter: fileName => fileName.includes('critical'),
styleTagFactory: ({ style }) => {
return `<style type="text/css">${style}</style>`;
},
leaveCSSFile: true,
replace: {
removeTarget: true,
target: '<!-- inline_css_plugin -->',
},
}),
The weird part is that if I set the filter for the negative, the other files are included inline:
filter: fileName => !fileName.includes('critical'),
NOTE: I'm using webpack 4
UPDATE: I went to try other versions and in the 1.3.2 is the last one working. Hope it helps.
Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically