-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
Version
2.5.3
Reproduction link
https://jsfiddle.net/semenov/1oa635w8/
Steps to reproduce
Run jsfiddle and note the warning message that is printed to the console.
Then run the same code with SSR:
const Vue = require('vue')
const app = new Vue({
template: '<div><bing-bang/></div>',
})
const renderer = require('vue-server-renderer').createRenderer()
renderer.renderToString(app, (err, html) => {
if (err) throw err
console.log(html)
})Like this: DEBUG=* node test.js
What is expected?
The SSR rendering prints a warning similar to what client-side rendering emits:
[Vue warn]: Unknown custom element: <bing-bang> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
(found in <Root>)
What is actually happening?
SSR simply renders invalid HTML:
<div data-server-rendered="true"><bing-bang></bing-bang></div>without any warnings.
This inconsistency makes it hard to refactor big Nuxt.js apps, as missing/unregistered components get silently ignored.
Metadata
Metadata
Assignees
Labels
No labels