You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently trying to use this plugin in a yarn 2 project. It incorrectly lists slash (and, possibly, other dependencies) as a devDependency even though it is used in the source code and should therefore be a runtime dependency. This, in yarn 2, results in the following error:
Error: html-webpack-deploy-plugin tried to access slash, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Required package: slash (via "slash")
Required by: html-webpack-deploy-plugin@virtual:[snip]#npm:3.0.0 (via /home/[snip]/.yarn/$$virtual/html-webpack-deploy-plugin-virtual-954ac73edc/0/cache/html-webpack-deploy-plugin-npm-3.0.0-94a8d4aa9b-8e5a71f1b8.zip/node_modules/html-webpack-deploy-plugin/src/)
Which makes it impossible to use html-webpack-deploy-plugin in a Yarn 2 context.
The text was updated successfully, but these errors were encountered:
Thanks for reporting this interesting issue. I haven't tried out yarn 2 yet so I've never seen this kind of problem.
slash is a dependency of html-webpack-tags-plugin which is a dependency of this package (and I also maintain both packages) so with yarn 1 it just worked since it's a transitive dependency...
I also am usually wary of adding re-used dependencies too many times as that runs the risk of having the version get out of sync and then multiple versions get installed. But I agree that leaving out of the dependencies of this plugin is odd/non-ideal. That said, it feels strange to me that since yarn 1 was less than great at handling peer dependencies and dependency chains in general, that they haven't improve the support/detection of such chains in version 2.
Would you care to put up a PR to make it work with yarn 2?
Hi,
Currently trying to use this plugin in a yarn 2 project. It incorrectly lists
slash
(and, possibly, other dependencies) as a devDependency even though it is used in the source code and should therefore be a runtime dependency. This, in yarn 2, results in the following error:Which makes it impossible to use
html-webpack-deploy-plugin
in a Yarn 2 context.The text was updated successfully, but these errors were encountered: