Closed jeetiss closed 4 months ago
Run & review this pull request in StackBlitz Codeflow.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
cf9ba61
) to head (5e194b5
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Path | Size |
---|---|
packages/wouter/esm/index.js | 2.13 KB (-0.64% 🔽) |
packages/wouter/esm/use-browser-location.js | 622 B (-4.31% 🔽) |
packages/wouter/esm/memory-location.js | 798 B (-3.39% 🔽) |
packages/wouter/esm/use-hash-location.js | 709 B (-4.19% 🔽) |
packages/wouter-preact/esm/index.js | 2.02 KB (0%) |
packages/wouter-preact/esm/use-browser-location.js | 552 B (0%) |
packages/wouter-preact/esm/use-hash-location.js | 618 B (0%) |
packages/wouter-preact/esm/memory-location.js | 702 B (0%) |
I guess this should fix https://github.com/molefrog/wouter/issues/435 as well
Thank you. In https://github.com/molefrog/wouter/pull/428 we added a hack to ensure that useInsertionEffect
isn't imported directly. Now we use a dynamic expression, would tree shaking work anyway? Is there any way to test this?
Thank you. In #428 we added a hack to ensure that
useInsertionEffect
isn't imported directly. Now we use a dynamic expression, would tree shaking work anyway? Is there any way to test this?
@jeetiss What are your thoughts on it?
@molefrog yep, hack with useInsertionEffect
is stoping tree-shaking
i think this can be tested with size-limit, we just have to remove react from ignore list
but tree-shakability testing makes no sense to me now
useInsertionEffect
^ and we can't fix it
remove destructuring assignment for react wildcard import because it prevents tree-shaking and removing makes code little bit smaller