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
The timeout for script tags loading chunks should be configurable.
🤔 Expected Behavior
The configured timeout should apply to script tags loading chunks.
😯 Current Behavior
The timeout for script tags loading chunks is currently left up to the browser implementation. iOS v17.5 has a much shorter timeout (120sec) than most other browsers (5min)
💁 Possible Solution
A config variable needs to be created and consumed by the code section below. Ideally, the timeout would be approached w/ a retry strategy if the browser's native timeout is shorter.
I am recording a constant percentage of non-trivial traffic failing to lazy-load chunks w/ parcel missing out on crucial functionality (consent management platform).
💻 Examples
Webpack has an option chunkLoadTimeout. This should be very useful to parcel users as well.
The text was updated successfully, but these errors were encountered:
Most of the time we don't use that loader. It's only used if the browser target doesn't support ES modules natively, which is now very rare. I don't think there's a way to configure the native dynamic import() timeout.
Alright, I cannot share the full sentry issue here but most events are reported by devices with iOS 17 & 18. Those usually support dynamic imports so maybe the feature detection/fallback mechanism doesn't work as expected? EDIT: Or maybe the build target is set too low?
I see that import() doesn't allow to configure a timeout directly but if the returned promise is rejected sooner than the proposed/configured timeout, this could trigger a retry-strategy.
🙋 feature request
The timeout for script tags loading chunks should be configurable.
🤔 Expected Behavior
The configured timeout should apply to script tags loading chunks.
😯 Current Behavior
The timeout for script tags loading chunks is currently left up to the browser implementation. iOS v17.5 has a much shorter timeout (120sec) than most other browsers (5min)
💁 Possible Solution
A config variable needs to be created and consumed by the code section below. Ideally, the timeout would be approached w/ a retry strategy if the browser's native timeout is shorter.
parcel/packages/runtimes/js/src/helpers/browser/js-loader.js
Line 26 in 96d8814
🔦 Context
I am recording a constant percentage of non-trivial traffic failing to lazy-load chunks w/ parcel missing out on crucial functionality (consent management platform).
💻 Examples
Webpack has an option chunkLoadTimeout. This should be very useful to parcel users as well.
The text was updated successfully, but these errors were encountered: