Skip to content

Commit

Permalink
feat!: set whitespace: 'condense' for template compiler (#3853)
Browse files Browse the repository at this point in the history
BREAKING CHANGE:
Detailed explanation: vuejs/vue#9208 (comment)

Take the following template as example:
```
<p>
  Welcome to <b>Vue.js</b> <i>world</i>.
  Have fun!
</p>
```

With `preserveWhitespace: false`, it was compiled as:
```
<p> Welcome to <b>Vue.js</b><i>world</i>. Have fun! </p>
```

With `whitespace: 'condense'`, it is now compiled as:
```
<p> Welcome to <b>Vue.js</b> <i>world</i>. Have fun! </p>
```

Note the **inline whitespace between tags** is preserved.

Closes #1020
  • Loading branch information
sodatea committed Apr 22, 2019
1 parent 42c2b71 commit dc2b85c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@vue/cli-service/lib/config/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ module.exports = (api, options) => {
.loader('vue-loader')
.options(Object.assign({
compilerOptions: {
preserveWhitespace: false
whitespace: 'condense'
}
}, vueLoaderCacheConfig))

Expand Down

0 comments on commit dc2b85c

Please sign in to comment.