Closed
Bug 1472542
Opened 8 years ago
Closed 7 years ago
DateRangePicker is using node polyfill setTimeout rather than the native browser API
Categories
(Tree Management :: Treeherder, defect, P2)
Tree Management
Treeherder
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: emorley)
References
Details
Attachments
(1 file)
It currently does:
`import { setTimeout } from 'timers';`
...which means webpack adds the timers-browserify polyfill to the bundle, rather than using the browser's built-in setTimeout. ('timers' is only needed for eg react native apps)
Comment 1•7 years ago
|
||
Comment 2•7 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder
https://github.com/mozilla/treeherder/commit/701e6b0e76f654936c7fc57ba3464d9fcc297ad6
Bug 1472542 - Use native setTimeout rather than via a polyfill (#4281)
The `timers` module is a Node.js built-in, which webpack will polyfill
during the build. Using it adds `timers-browserify` to the bundle
unnecessarily, given that browsers natively support `setTimeout`:
https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout
(This import was presumably copied from a react-native code example.)
| Assignee | ||
Updated•7 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Updated•4 years ago
|
Component: Intermittent Failures View → TreeHerder
You need to log in
before you can comment on or make changes to this bug.
Description
•