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

feat: option to disable pre-transform #6309

Merged
merged 3 commits into from Dec 30, 2021
Merged

Conversation

antfu
Copy link
Member

@antfu antfu commented Dec 29, 2021

Description

The pre-transformation is a brilliant optimization to improve the waterfall requests for browsers. But when it's been used for other senario (Vitest, Nuxt, etc.) with lower request overhead, this sometimes could become a negative optimization.

Resolves vitest-dev/vitest#229 (comment)

Additional context

Another option is to provide the option in transformRequest, but that requires a bit complex options passing for plugins and might introduce too much complexity.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@antfu antfu added YAO Yet another option... p2-nice-to-have Not breaking anything but nice to have (priority) labels Dec 30, 2021
@antfu antfu merged commit 2c14525 into main Dec 30, 2021
@antfu antfu deleted the feat/pre-transform-options branch December 30, 2021 07:22
antfu added a commit that referenced this pull request Dec 30, 2021
@bluwy bluwy mentioned this pull request Dec 30, 2021
9 tasks
aleclarson pushed a commit to aleclarson/vite that referenced this pull request Jan 6, 2022
aleclarson pushed a commit to aleclarson/vite that referenced this pull request Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have Not breaking anything but nice to have (priority) YAO Yet another option...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests run 3x slower than Jest
2 participants