Skip to content

perf: optimize import.meta.env in destructuring assignments#20313

Merged
alexander-akait merged 1 commit intomainfrom
importMetaEnv
Jan 15, 2026
Merged

perf: optimize import.meta.env in destructuring assignments#20313
alexander-akait merged 1 commit intomainfrom
importMetaEnv

Conversation

@xiaoxiaojx
Copy link
Member

Summary
perf: optimize import.meta.env in destructuring assignments

What kind of change does this PR introduce?
perf

Did you add tests for your changes?
Yes

Does this PR introduce a breaking change?
No

If relevant, what needs to be documented once your changes are merged or what have you already documented?
Nothing

@changeset-bot
Copy link

changeset-bot bot commented Jan 15, 2026

🦋 Changeset detected

Latest commit: 674bac5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
webpack Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jan 15, 2026

This PR is packaged and the instant preview is available (aa63096).

Install it locally:

  • npm
npm i -D webpack@https://pkg.pr.new/webpack@aa63096
  • yarn
yarn add -D webpack@https://pkg.pr.new/webpack@aa63096
  • pnpm
pnpm add -D webpack@https://pkg.pr.new/webpack@aa63096

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 15, 2026

Merging this PR will improve performance by 21%

⚡ 1 improved benchmark
✅ 71 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
benchmark "asset-modules-bytes", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 40.6 ms 33.5 ms +21%

Comparing importMetaEnv (674bac5) with main (d2df541)

Open in CodSpeed

@alexander-akait alexander-akait merged commit aa63096 into main Jan 15, 2026
90 of 92 checks passed
@alexander-akait alexander-akait deleted the importMetaEnv branch January 15, 2026 10:04
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.

2 participants