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(vite-plugin-angular): only filter to Angular CDK packages for ESM transform #796

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

brandonroberts
Copy link
Member

@brandonroberts brandonroberts commented Dec 13, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Which package are you modifying?

  • vite-plugin-angular
  • vite-plugin-nitro
  • astro-angular
  • create-analog
  • router
  • platform
  • content
  • nx-plugin
  • trpc

What is the current behavior?

All packages containing fesm2022 in the filename were transformed to es2016 using esbuild. This causes slower performance when running tests with Vitest in Angular.

Closes #

What is the new behavior?

By default, only filenames containing cdk/fesm2022 are transformed using esbuild. This drastically improves performance when running tests with Vitest in Angular, while keeping compatibility with existing tests.

Additional files can be added to the transform using the ssr.noExternal array in the vite.config.ts but this satisfies using Angular component harness tests as well as regular unit tests using async/await.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

[optional] What gif best describes this PR or how it makes you feel?

Copy link

netlify bot commented Dec 13, 2023

Deploy Preview for analog-docs ready!

Name Link
🔨 Latest commit b6229e6
🔍 Latest deploy log https://app.netlify.com/sites/analog-docs/deploys/6579ebed932086000882027a
😎 Deploy Preview https://deploy-preview-796--analog-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 13, 2023

Deploy Preview for analog-blog ready!

Name Link
🔨 Latest commit b6229e6
🔍 Latest deploy log https://app.netlify.com/sites/analog-blog/deploys/6579ebed6c35010008d8d39f
😎 Deploy Preview https://deploy-preview-796--analog-blog.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 13, 2023

Deploy Preview for analog-app ready!

Name Link
🔨 Latest commit b6229e6
🔍 Latest deploy log https://app.netlify.com/sites/analog-app/deploys/6579ebed2fee290008ccf009
😎 Deploy Preview https://deploy-preview-796--analog-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@brandonroberts brandonroberts changed the title perf(vite-plugin-angular): only filter to Angular testing packages for ESM transform perf(vite-plugin-angular): only filter to Angular CDK testing packages for ESM transform Dec 13, 2023
@brandonroberts brandonroberts changed the title perf(vite-plugin-angular): only filter to Angular CDK testing packages for ESM transform perf(vite-plugin-angular): only filter to Angular CDK packages for ESM transform Dec 13, 2023
@brandonroberts brandonroberts merged commit d5256a8 into main Dec 13, 2023
19 checks passed
@brandonroberts brandonroberts deleted the perf-vitest-transform branch December 13, 2023 18:19
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.

1 participant