vuejs / component-compiler-utils

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

Please remove prettier #71

Closed mariusa closed 4 years ago

mariusa commented 4 years ago

A compiler shouldn't depend on code formatting / beautifier utilities. That's the job of the IDE. vscode already handles this very well, for example.

Would you please remove prettier dependency?

sodatea commented 4 years ago

Why? It's good for debugging purpose. That's why it's only used when NODE_ENV !== 'production'. And we've also provided a prettify option to turn it off.

mariusa commented 4 years ago

To avoid yet another dependency. It seems strange for a compiler to do code formatting. There are separate tools to do debugging, code editing, etc. A compiler should focus on compiling.

sodatea commented 4 years ago

For now, we still need code formatting at this level for a better template debugging experience.

We can remove it for Vue 3, though, because templates in Vue 3 will have much better source map support.