Repo to debug different behaviours between Webpack 4 & Webpack 5
Using the same react component we get different experiences when building with Webpack 4 & Webpack 5 on iOS
- Install the desired Webpack version using the commands below
- Run
npm run start
- Using Xcode Simulator open an iPhone (I've been testing with iPhone 15 running iOS 17.0) or open on real iPhone device or using Safari on Desktop
- Navigate to http://localhost:8080
- Click on the button
cat webpack4-package.json > package.json && npm install
cat webpack5-package.json > package.json && npm install
Clicking the button would open a new tab when building with Webpack 4 & Webpack 5 on iOS.
Clicking the button would open a new tab when building with Webpack 4 only. When building with Webpack 5 the new tab does not open. The popup gets blocked.
Note: Running the same code on Chrome/Firefox Desktop works as expected on both Webpack 4 & Webpack 5.