Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set default render when template is empty #1745

Closed
wants to merge 2 commits into from

Conversation

meteorlxy
Copy link
Member

@meteorlxy meteorlxy commented Oct 22, 2020

@vue/compiler-sfc will return null if <template> is empty, so we need default render to handle it.

https://github.com/vuejs/vue-next/blob/f4621ff5ee4abe924d985177956af3ddc9bb378f/packages/compiler-sfc/__tests__/parse.spec.ts#L114-L119

Also, this is also handled by rollup-plugin-vue:

https://github.com/vuejs/rollup-plugin-vue/blob/6960203fdc4285b4322a2c4f061f4a2773d49c9c/src/index.ts#L469

Without this default render, it would cause "Component is missing template or render function" warning

@meteorlxy
Copy link
Member Author

Close due to vuejs/core#2463

@meteorlxy meteorlxy closed this Oct 22, 2020
@meteorlxy meteorlxy deleted the fix/empty-template branch November 2, 2020 14:19
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.

1 participant