Skip to content

Conversation

alexander-akait
Copy link
Member

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

Avoid loading a lot of modules on initial load + lazy loading + faster tracing source maps

Breaking Changes

No

Additional Info

No

@alexander-akait alexander-akait force-pushed the fix-improve-loading-time branch from 787b748 to 8eaf104 Compare June 12, 2023 22:39
@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.18 🎉

Comparison is base (72e5151) 95.91% compared to head (752604e) 96.09%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #235      +/-   ##
==========================================
+ Coverage   95.91%   96.09%   +0.18%     
==========================================
  Files           3        3              
  Lines         269      282      +13     
  Branches      107      111       +4     
==========================================
+ Hits          258      271      +13     
  Misses         11       11              
Impacted Files Coverage Δ
src/minify.js 84.37% <ø> (ø)
src/utils.js 91.66% <ø> (ø)
src/index.js 98.23% <100.00%> (+0.10%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@alexander-akait alexander-akait merged commit 959eb89 into master Jun 13, 2023
@alexander-akait alexander-akait deleted the fix-improve-loading-time branch June 13, 2023 12:47
@SoloJiang
Copy link

👍


/**
* @template T
* @param fn {(function(): any) | undefined}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be @param {function (): T} fn instead ? This would allow typescript to infer T properly. Also, the argument should not be undefined as that would break. The current signature means that type checking won't catch mistakes (the need to override the type when using the variable hides the fact that the type checker cannot trust it)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stof Good catch, feel free to send a fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants