vitejs / vite-plugin-vue2

Vite plugin for Vue 2.7
MIT License
543 stars 46 forks source link

Whitespace "preserve" #66

Open mcube27 opened 1 year ago

mcube27 commented 1 year ago

Hi,

I have this code in my sfc:

<div class="dashboard-header-title">
  <span v-if="!isEdition" class="dashboard-header-title">
    {{ $t('booking.titleAdd') }}
  </span>
  <span v-else class="dashboard-header-title">
    {{ $t('booking.titleEdit') }}
  </span>
  <span>{{ $t('booking.at') }} {{ vendor.public_name }}</span>
</div>

And I can't get to have a space before my last span even when configuring the plugin like this in vite.config:

vue({
  template: {
    compilerOptions: {
      whitespace: 'preserve'
    }
  }
})

Is there a way or is it a bug ?