fix: @vue/server-renderer tree-shaking (#148)

This commit is contained in:
Nate Moore 2021-04-29 14:11:35 -05:00 committed by GitHub
parent 99a916ec1f
commit 03775f7048
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,6 +4,9 @@ import { renderToString } from '@vue/server-renderer';
import { defineComponent, createSSRApp, h as createElement } from 'vue';
import { createRenderer } from './renderer';
// This prevents tree-shaking of render.
Function.prototype(renderToString);
/**
* Users might attempt to use :vueAttribute syntax to pass primitive values.
* If so, try to JSON.parse them to get the primitives