You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not a suggestion for vue but for vue-loader. It's kind of preprocessing.
<Text> and </Text> are just marks of textContent's ends.
<!-- #0 --><!-- nowadays, produces untrimmed textContent --><div>
{{text}}
<Child/>
Plain text
</div><!-- #1 --><!-- more beautiful than #2 --><!-- will be transformed into #2, textContent is trimmed! --><div><Text>{{text}}</Text><Child/><Text> Plain text</Text></div><!-- #2 --><div>{{text}}<Child/> Plain Text</div>
in the sense that it could be "unsafe" - the user may want to ignore whitespaces between tags, but not necessarily trimming all plain text, e.g inside <pre>
If users want to trim text node, they can use the marks, it would be "safe".
Ignoring additional whitespace nodes has a small perf gain, but trimming text doesn't do much in that aspect.
current
output:
what I want
Suggestion
Wrap
text content
with a tag like<Text></Text>
. The tag will be removed at webpack's compile-time.loader's configuration:
vuejs/vue#3934
The text was updated successfully, but these errors were encountered: