fix: @vue/server-renderer tree-shaking (#148)
This commit is contained in:
parent
99a916ec1f
commit
03775f7048
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue