underfin / vite-plugin-vue2

Vue2 plugin for Vite
621 stars 84 forks source link

compilerOptions.whitespace should default to `preserve` #80

Closed phyng closed 3 years ago

phyng commented 3 years ago

This commit(https://github.com/underfin/vite-plugin-vue2/commit/ab62cce0569db1bd655816d828f4000faad310dd) break all my project UI, and the https://github.com/vuejs/vue/tree/dev/packages/vue-template-compiler#options is default to preserve, use preserve suitable for most projects.

I think as a vue plugin should respect the default value of vueTemplateOptions.

phyng commented 3 years ago

If anyone has a similar problem, you can temporarily use the following configuration:

createVuePlugin({
  vueTemplateOptions: {
    compilerOptions: {
      whitespace: 'preserve'
    }
  }
})