You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the current behavior?
Using the same React component we get different experiences when building with Webpack 4 & Webpack 5 on iOS devices
Clicking a button to open a new tab in an async call would only work when building with Webpack 4.
When building with Webpack 5 the new tab does not open when you click the button. The popup gets blocked.
Note: Clicking the button on Chrome/Firefox desktop works as expected (opens new tab) on both Webpack 4 & Webpack 5.
I understand that the code that triggers the new tab might not be the best but I'm really curious to understand why this works with Webpack 4 and doesn't with Webpack 5. And how come it only seems to affect Apple devices 🤔
If the current behavior is a bug, please provide the steps to reproduce.
The text was updated successfully, but these errors were encountered:
samiashi
changed the title
Different behaviours between Webpack 4 & Webpack 5
Different behaviour between Webpack 4 & Webpack 5
Jan 27, 2024
samiashi
changed the title
Different behaviour between Webpack 4 & Webpack 5
Different window.open in an async call behaviour between Webpack 4 & Webpack 5
Jan 27, 2024
I am sure there are no problems with webpack, we don't override your code and don't change logic, maybe something with dev env, I will investigate it later
Bug report
What is the current behavior?
Using the same React component we get different experiences when building with Webpack 4 & Webpack 5 on iOS devices
Clicking a button to open a new tab in an async call would only work when building with Webpack 4.
When building with Webpack 5 the new tab does not open when you click the button. The popup gets blocked.
Note: Clicking the button on Chrome/Firefox desktop works as expected (opens new tab) on both Webpack 4 & Webpack 5.
I understand that the code that triggers the new tab might not be the best but I'm really curious to understand why this works with Webpack 4 and doesn't with Webpack 5. And how come it only seems to affect Apple devices 🤔
If the current behavior is a bug, please provide the steps to reproduce.
I've created a repo to reproduce the issue https://github.com/samiashi/react-webpack-debug
Instructions are included there as well to reproduce the issue
npm run start
What is the expected behavior?
Clicking a button to open a new tab inside an async call should work when building with Webpack 4 & Webpack 5 on iOS.
Running with Webpack 4
webpack4.mov
Running with Webpack 5
webpack5.mov
Other relevant information:
webpack version: 5.90.0
Node.js version: v18.18.2
Operating System: iOS
Additional tools:
The text was updated successfully, but these errors were encountered: