server side render vue component by vue version
const render = require("versioned-vue-component");
expect(
render.renderComponentCodeToString({
props: {
title: "my"
},
// version:'16.9.0', // currently only support 16.9.0
// build by rollup iife
componentCode: `
var x=(function(){ .... })();
`
})
).toMatchInlineSnapshot(`"<div data-reactroot=\\"\\">my</div>"`);
- renderComponentCodeToString
- renderComponentCodeToStaticMarkup
- renderComponentCodeToNodeStream
- renderComponentCodeToStaticNodeStream