clarkdo / hare

🐇 Application boilerplate based on Vue.js 2.x, Koa 2.x, Element-UI and Nuxt.js

Home Page:https://nuxt-hare.herokuapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

preserveWhitespace=false not work in Nuxt2

herrdu opened this issue · comments

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)

I have found the solution.

Add this to nuxt.config.js

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