vitejs / vite-plugin-vue2

Vite plugin for Vue 2.7
MIT License
551 stars 48 forks source link

Whitespace "preserve" #66

Open mcube27 opened 2 years ago

mcube27 commented 2 years 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 ?