Reduce Bundle Size#1372
Conversation
4a8cef1 to
29693ea
Compare
sherwinski
left a comment
There was a problem hiding this comment.
I guess I'm a bit confused about one thing: we're opting to wildcard import all of these modules but I was under the impression that doing so would interfere with tree shaking? Am I missing something here?
| }; | ||
| } catch (e) { | ||
| if (e instanceof Error && e.name === 'TypeError') { | ||
| await delay(RETRY_BACKOFF[retry]); |
There was a problem hiding this comment.
This change doesn't seem consistent with the old backoff strategy:
export const RETRY_BACKOFF: { [key: number]: number } = {
5: 10_000,
4: 20_000,
3: 30_000,
2: 30_000,
1: 30_000,
};Wouldn't this just increase by 10000 ms each time after the update?
7ee6744 to
c01701a
Compare
The vite config tree-shake smallest which will do aggressive minification and use only used exports. |
| } catch (e) { | ||
| if (e instanceof Error && e.name === 'TypeError') { | ||
| await delay(retry * 1e4); | ||
| // start with 30 seconds, then 20 seconds, then 10 seconds |
There was a problem hiding this comment.
Doesn't the backoff strategy start with 10, then 20, then 30 seconds? Since we're decrementing retry.
There was a problem hiding this comment.
Oops updated comment
630ea2a to
c905fac
Compare
c905fac to
73611ec
Compare
Description
1 Line Summary
Reduce bundle size from:
Main:
Branch:
Details
Systems Affected
Validation
Tests
Info
Checklist
Programming Checklist
Interfaces:
Functions:
Typescript:
Other:
elem of arraysyntax. PreferforEachor usemapcontextif possible. Instead, we can pass it to function/constructor so that we don't callOneSignal.contextScreenshots
Info
Checklist
Related Tickets
This change is