Make posthtml a peer dependency?
jescalan opened this issue · comments
Jeff Escalante commented
This is the way that babel-loader does it. postcss-loader
on the other hand bundles it directly.
The advantages are that the user has control over the posthtml version and the two are not so tightly bundled together. It also means that this package doesn't need to be re-released if there is a major version bump that doesn't break the api utilized by this loader. The disadvantage is that the user will need to run npm i posthtml posthtml-loader
instead of just npm i posthtml-loader
. Just looking at this now it seems to me like the advantages outweigh the disadvantages, but I could be convinced otherwise!