clarkdo / hare

🐇 Application boilerplate based on Vue.js 2.x, Koa 2.x, Element-UI and Nuxt.js
https://nuxt-hare.herokuapp.com
Other
256 stars 53 forks source link

preserveWhitespace=false not work in Nuxt2 #353

Closed herrdu closed 6 years ago

herrdu commented 6 years ago

Steps to reproduce

Yesterday ,I update my project to Nuxt2.0 from Nuxt1.0. I found the space between dom element has changed. So , I set preserveWhitespace:false to vue-loader. But it's not working ?

Does someone konw the reason? 46240725-781b2100-c3de-11e8-80d1-e837c0c94798.png

What is expected ?

WX20180929-120230.png

What is actually happening?

WX20180929-120241.png

This bug report is available on Nuxt community (#c101)
herrdu commented 6 years ago

I have found the solution.

Add this to nuxt.config.js

loaders: { vue: { compilerOptions: { preserveWhitespace: false } } },