Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ssr): corejs polyfill not available in nodejs #10184

Merged
merged 1 commit into from
Dec 30, 2022

Conversation

fz6m
Copy link
Contributor

@fz6m fz6m commented Dec 30, 2022

去掉 <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 。

@vercel
Copy link

vercel bot commented Dec 30, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
umi ⬜️ Ignored (Inspect) Dec 30, 2022 at 6:19AM (UTC)

@codecov
Copy link

codecov bot commented Dec 30, 2022

Codecov Report

Base: 29.87% // Head: 29.87% // No change to project coverage 👍

Coverage data is based on head (ed218d9) compared to base (2c360ad).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #10184   +/-   ##
=======================================
  Coverage   29.87%   29.87%           
=======================================
  Files         432      432           
  Lines       12410    12410           
  Branches     2974     2974           
=======================================
  Hits         3708     3708           
  Misses       8136     8136           
  Partials      566      566           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sorrycc sorrycc merged commit 4b5a81f into umijs:master Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants