vuejs / component-compiler-utils

Lower level utilities for compiling Vue single file components
319 stars 75 forks source link

Switch `prettier` to an optional- or peerDependency #84

Closed sirlancelot closed 4 years ago

sirlancelot commented 4 years ago

With the release of Prettier v2.x, projects wishing to update to the latest version will download both versions of Prettier due to this module having a hard dependency on v1.x.

Since Prettier is only require'd when prettify == true and NODE_ENV != "production", can this dependency be switched to an optionalDependency or peerDependency? Or perhaps its version requirement relaxed to include v2.x?

P4sca1 commented 4 years ago

Totally agree with making prettier a peerDependency. Currently this causes problems in my workspace, because yarn keeps placing a version < 2.0.0 in the .bin folder, even though I have listed prettier 2.0.4 in my dependencies.

sodatea commented 4 years ago

Currently this causes problems in my workspace

To be fair, it is Yarn that causes the problem, not this package.