Skip to content

fix(compiler-sfc): should keep template nodes with no content (close #2463)#2468

Merged
yyx990803 merged 1 commit intovuejs:masterfrom
meteorlxy:fix/sfc
Dec 4, 2020
Merged

fix(compiler-sfc): should keep template nodes with no content (close #2463)#2468
yyx990803 merged 1 commit intovuejs:masterfrom
meteorlxy:fix/sfc

Conversation

@meteorlxy
Copy link
Copy Markdown
Member

@meteorlxy meteorlxy commented Oct 23, 2020

See #2463

This tweak is based on the following consideration:

An empty <template> block means it should render empty string, which is different from no <template> block.

@znck
Copy link
Copy Markdown
Member

znck commented Nov 3, 2020

SFC descriptor should keep all the blocks as some dev toolings depend on the structure of the file. e.g. VueDX/TS-Plugin auto imports components in <script> block but if descriptor.script is null it adds a <script> block.

@yyx990803 yyx990803 merged commit 5b9b37f into vuejs:master Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants