fix(ssr): corejs polyfill not available in nodejs #10184
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
去掉
<TestBrowser />
的 polyfill 。原因
<TestBrowser />
带来了一个./core/polyill
的入口,导致 ssr 在开发时会把这部分 corejs 的 polyfill 打包进去。但是 core-js 含有在 nodejs 里无法使用的 polyfill (这里是
core-js/modules/web.dom-exception.stack.js
),导致 ssr 没法用了,类似的问题见 vuejs/vuepress#3065 。另外
<TestBrowser />
在本地 nodejs 里测试用,不需要 polyfill 。