Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve perf #235

Merged
merged 4 commits into from
Jun 13, 2023
Merged

fix: improve perf #235

merged 4 commits into from
Jun 13, 2023

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

@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
16 of 17 checks passed
@alexander-akait alexander-akait deleted the fix-improve-loading-time branch June 13, 2023 12:47
@SoloJiang
Copy link

👍

@@ -153,6 +151,40 @@ const { minify: minifyWorker } = require("./minify");

const warningRegex = /\s.+:+([0-9]+):+([0-9]+)/;

/**
* @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.

None yet

3 participants