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

Expected polyfills (like Promise.withResolvers) are not inserted #63104

Closed
kodai3 opened this issue Mar 10, 2024 · 3 comments · Fixed by #67378, vercel/turborepo#8646 or vercel/turborepo#8706
Assignees
Labels
bug Issue was opened via the bug report template. linear: turbopack Confirmed issue that is tracked by the Turbopack team. locked

Comments

@kodai3
Copy link

kodai3 commented Mar 10, 2024

Link to the code that reproduces this issue

https://github.com/kodai3/pollyfill-minimal-repo

To Reproduce

  1. Start the application
  2. Open http:localhost:3000 on (iOS) Safari < 17.4 (You won't see the error on the latest Chrome as expected)
  3. Click Click to Find Pollyfill
  4. You see the error Promise.withResolvers is not a function.

Current vs. Expected behavior

I assume it is not properly polyfilled.

SWC's builtin definitions for core-js are updated here and poyfill for likes of Promise.withResolvers are added and released at v1.3.73. Latest Next.js uses swc_core v0.87.19 which include @swc/core@1.3.81 ~ @swc/core@1.3.105, so the upade should be applied to the application as well, isn't it ?

I made sure browserslist on package.json are respected and passed to the swc option just in case.
(Even though compiled browserslist version is behind like this again and there is difference in outputs, it is not related I think)

Provide environment information

Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 23.3.0: Wed Dec 20 21:28:58 PST 2023; root:xnu-10002.81.5~7/RELEASE_X86_64
Binaries:
  Node: 18.19.0
  npm: 10.2.3
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.1.3
  eslint-config-next: 14.1.3
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.4.2
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

SWC transpilation

Which stage(s) are affected? (Select all that apply)

next dev (local), next start (local), Other (Deployed)

Additional context

No response

@kodai3 kodai3 added the bug Issue was opened via the bug report template. label Mar 10, 2024
@github-actions github-actions bot added the SWC Related to minification/transpilation in Next.js. label Mar 10, 2024
@kdy1 kdy1 assigned kdy1 and unassigned kdy1 Apr 12, 2024
@kdy1 kdy1 removed the SWC Related to minification/transpilation in Next.js. label Apr 14, 2024
@allicanseenow
Copy link

Would love to have an update for this

@kdy1 kdy1 self-assigned this Jul 4, 2024
@kdy1 kdy1 added the linear: turbopack Confirmed issue that is tracked by the Turbopack team. label Jul 4, 2024
@kdy1
Copy link
Member

kdy1 commented Jul 10, 2024

Reopening as it's reverted

@kdy1 kdy1 reopened this Jul 10, 2024
kdy1 added a commit that referenced this issue Jul 12, 2024
# Turbopack
* vercel/turborepo#8686 <!-- Tobias Koppers -
improve performance of the graph aggregation -->
* vercel/turborepo#8694 <!-- Benjamin Woodruff -
Replace `unreachable` with `bail` in `finalize_css` -->
* vercel/turborepo#8661 <!-- Benjamin Woodruff -
Create a minimum viable `ResolvedVc` type -->
* vercel/turborepo#8662 <!-- Benjamin Woodruff - Add
a minimum viable ResolvedValue marker trait -->
* vercel/turborepo#8678 <!-- Benjamin Woodruff - Add
derive macro for ResolvedValue -->
* vercel/turborepo#8715 <!-- Benjamin Woodruff -
Switch RcStr from std::sync::Arc to triomphe::Arc -->
* vercel/turborepo#8699 <!-- Donny/강동윤 - perf: Merge
multiple `EsmBinding` -->
* vercel/turborepo#8720 <!-- Benjamin Woodruff - Add
support for `#[turbo_tasks::value(resolved)]` and
`#[turbo_tasks::value_trait(resolved)]` -->
* vercel/turborepo#8706 <!-- Donny/강동윤 - build:
Update `swc_core` to `v0.96.9` -->

### What?

Update SWC crates to
swc-project/swc@226617e
and
swc-project/plugins@b7658c3

### Why?

To keep in sync

### How?

 - Closes #64890
 - Closes #63104
ForsakenHarmony pushed a commit that referenced this issue Jul 25, 2024
### Description

Update SWC crates to
swc-project/swc@226617e
and
swc-project/plugins@b7658c3



 - Closes #64890
 - Closes #63104


### Testing Instructions

See #67378
ForsakenHarmony pushed a commit that referenced this issue Jul 25, 2024
### Description

Update swc crates

### Testing Instructions


See [next.js counterpart](#67378)


 - Closes #64890
 - Closes #63104
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 26, 2024
ForsakenHarmony pushed a commit that referenced this issue Jul 29, 2024
### Description

Update SWC crates to
swc-project/swc@226617e
and
swc-project/plugins@b7658c3



 - Closes #64890
 - Closes #63104


### Testing Instructions

See #67378
ForsakenHarmony pushed a commit that referenced this issue Jul 29, 2024
### Description

Update swc crates

### Testing Instructions


See [next.js counterpart](#67378)


 - Closes #64890
 - Closes #63104
ForsakenHarmony pushed a commit that referenced this issue Jul 29, 2024
### Description

Update SWC crates to
swc-project/swc@226617e
and
swc-project/plugins@b7658c3



 - Closes #64890
 - Closes #63104


### Testing Instructions

See #67378
ForsakenHarmony pushed a commit that referenced this issue Jul 29, 2024
### Description

Update swc crates

### Testing Instructions


See [next.js counterpart](#67378)


 - Closes #64890
 - Closes #63104
ForsakenHarmony pushed a commit that referenced this issue Aug 1, 2024
### Description

Update SWC crates to
swc-project/swc@226617e
and
swc-project/plugins@b7658c3



 - Closes #64890
 - Closes #63104


### Testing Instructions

See #67378
ForsakenHarmony pushed a commit that referenced this issue Aug 1, 2024
### Description

Update swc crates

### Testing Instructions


See [next.js counterpart](#67378)


 - Closes #64890
 - Closes #63104
ForsakenHarmony pushed a commit that referenced this issue Aug 14, 2024
* vercel/turborepo#8686 <!-- Tobias Koppers -
improve performance of the graph aggregation -->
* vercel/turborepo#8694 <!-- Benjamin Woodruff -
Replace `unreachable` with `bail` in `finalize_css` -->
* vercel/turborepo#8661 <!-- Benjamin Woodruff -
Create a minimum viable `ResolvedVc` type -->
* vercel/turborepo#8662 <!-- Benjamin Woodruff - Add
a minimum viable ResolvedValue marker trait -->
* vercel/turborepo#8678 <!-- Benjamin Woodruff - Add
derive macro for ResolvedValue -->
* vercel/turborepo#8715 <!-- Benjamin Woodruff -
Switch RcStr from std::sync::Arc to triomphe::Arc -->
* vercel/turborepo#8699 <!-- Donny/강동윤 - perf: Merge
multiple `EsmBinding` -->
* vercel/turborepo#8720 <!-- Benjamin Woodruff - Add
support for `#[turbo_tasks::value(resolved)]` and
`#[turbo_tasks::value_trait(resolved)]` -->
* vercel/turborepo#8706 <!-- Donny/강동윤 - build:
Update `swc_core` to `v0.96.9` -->

Update SWC crates to
swc-project/swc@226617e
and
swc-project/plugins@b7658c3

To keep in sync

 - Closes #64890
 - Closes #63104
ForsakenHarmony pushed a commit that referenced this issue Aug 15, 2024
* vercel/turborepo#8686 <!-- Tobias Koppers -
improve performance of the graph aggregation -->
* vercel/turborepo#8694 <!-- Benjamin Woodruff -
Replace `unreachable` with `bail` in `finalize_css` -->
* vercel/turborepo#8661 <!-- Benjamin Woodruff -
Create a minimum viable `ResolvedVc` type -->
* vercel/turborepo#8662 <!-- Benjamin Woodruff - Add
a minimum viable ResolvedValue marker trait -->
* vercel/turborepo#8678 <!-- Benjamin Woodruff - Add
derive macro for ResolvedValue -->
* vercel/turborepo#8715 <!-- Benjamin Woodruff -
Switch RcStr from std::sync::Arc to triomphe::Arc -->
* vercel/turborepo#8699 <!-- Donny/강동윤 - perf: Merge
multiple `EsmBinding` -->
* vercel/turborepo#8720 <!-- Benjamin Woodruff - Add
support for `#[turbo_tasks::value(resolved)]` and
`#[turbo_tasks::value_trait(resolved)]` -->
* vercel/turborepo#8706 <!-- Donny/강동윤 - build:
Update `swc_core` to `v0.96.9` -->

Update SWC crates to
swc-project/swc@226617e
and
swc-project/plugins@b7658c3

To keep in sync

 - Closes #64890
 - Closes #63104
ForsakenHarmony pushed a commit that referenced this issue Aug 16, 2024
* vercel/turborepo#8686 <!-- Tobias Koppers -
improve performance of the graph aggregation -->
* vercel/turborepo#8694 <!-- Benjamin Woodruff -
Replace `unreachable` with `bail` in `finalize_css` -->
* vercel/turborepo#8661 <!-- Benjamin Woodruff -
Create a minimum viable `ResolvedVc` type -->
* vercel/turborepo#8662 <!-- Benjamin Woodruff - Add
a minimum viable ResolvedValue marker trait -->
* vercel/turborepo#8678 <!-- Benjamin Woodruff - Add
derive macro for ResolvedValue -->
* vercel/turborepo#8715 <!-- Benjamin Woodruff -
Switch RcStr from std::sync::Arc to triomphe::Arc -->
* vercel/turborepo#8699 <!-- Donny/강동윤 - perf: Merge
multiple `EsmBinding` -->
* vercel/turborepo#8720 <!-- Benjamin Woodruff - Add
support for `#[turbo_tasks::value(resolved)]` and
`#[turbo_tasks::value_trait(resolved)]` -->
* vercel/turborepo#8706 <!-- Donny/강동윤 - build:
Update `swc_core` to `v0.96.9` -->

Update SWC crates to
swc-project/swc@226617e
and
swc-project/plugins@b7658c3

To keep in sync

 - Closes #64890
 - Closes #63104
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. linear: turbopack Confirmed issue that is tracked by the Turbopack team. locked
Projects
None yet
3 participants