Skip to content

Commit a8f98a9

Browse files
committed
feat!: set whitespace: 'condense' for template compiler
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.
1 parent 3907d22 commit a8f98a9

File tree

1 file changed

+1
-1
lines changed
  • packages/@vue/cli-service/lib/config

1 file changed

+1
-1
lines changed

packages/@vue/cli-service/lib/config/base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ module.exports = (api, options) => {
8484
.loader('vue-loader')
8585
.options(Object.assign({
8686
compilerOptions: {
87-
preserveWhitespace: false
87+
whitespace: 'condense'
8888
}
8989
}, vueLoaderCacheConfig))
9090

0 commit comments

Comments
 (0)