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

perf: use esbuild to process .mjs files #1142

Merged
merged 1 commit into from
Nov 6, 2021
Merged

perf: use esbuild to process .mjs files #1142

merged 1 commit into from
Nov 6, 2021

Conversation

ahnpnl
Copy link
Collaborator

@ahnpnl ahnpnl commented Nov 6, 2021

Summary

With esbuild on Linux Node 12 no Jest cache

transform /home/runner/work/jest-preset-angular/jest-preset-angular/examples/example-app-v13/node_modules/@angular/core/fesm2015/testing.mjs: 68.032ms
transform /home/runner/work/jest-preset-angular/jest-preset-angular/examples/example-app-v13/node_modules/@angular/core/fesm2015/core.mjs: 126.100ms
transform /home/runner/work/jest-preset-angular/jest-preset-angular/examples/example-app-v13/node_modules/@angular/compiler/fesm2015/compiler.mjs: 147.075ms

With TypeScript transpileModule on Linux Node 12 no Jest cache

transform /home/runner/work/jest-preset-angular/jest-preset-angular/examples/example-app-v13/node_modules/@angular/core/fesm2015/testing.mjs: 764.372ms
transform /home/runner/work/jest-preset-angular/jest-preset-angular/examples/example-app-v13/node_modules/@angular/core/fesm2015/core.mjs: 3948.006ms
transform /home/runner/work/jest-preset-angular/jest-preset-angular/examples/example-app-v13/node_modules/@angular/compiler/fesm2015/compiler.mjs: 4637.688ms

With esbuild on Windows Node 12 no Jest cache

transform D:\a\jest-preset-angular\jest-preset-angular\examples\example-app-v13\node_modules\@angular\core\fesm2015\testing.mjs: 105.483ms
transform D:\a\jest-preset-angular\jest-preset-angular\examples\example-app-v13\node_modules\@angular\core\fesm2015\core.mjs: 144.012ms
transform D:\a\jest-preset-angular\jest-preset-angular\examples\example-app-v13\node_modules\@angular\compiler\fesm2015\compiler.mjs: 176.672ms

With TypeScript on Windows Node 12 no Jest cache

transform D:\a\jest-preset-angular\jest-preset-angular\examples\example-app-v13\node_modules\@angular\core\fesm2015\testing.mjs: 1117.941ms
transform D:\a\jest-preset-angular\jest-preset-angular\examples\example-app-v13\node_modules\@angular\core\fesm2015\core.mjs: 5654.243ms
transform D:\a\jest-preset-angular\jest-preset-angular\examples\example-app-v13\node_modules\@angular\compiler\fesm2015\compiler.mjs: 6453.094ms

Closes #1141

Test plan

Added unit test and e2e test

Green CI

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

N.A.

@ahnpnl ahnpnl changed the title fix: use esbuild to process .mjs files perf: use esbuild to process .mjs files Nov 6, 2021
@ahnpnl ahnpnl marked this pull request as ready for review November 6, 2021 11:41
@ahnpnl ahnpnl merged commit 5d3fe10 into thymikee:main Nov 6, 2021
@ahnpnl ahnpnl deleted the use-esbuild branch November 6, 2021 11:41
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.

[Bug (Angular 13)]: Transforming @angular/ modules is slow
1 participant