Skip to content
This repository was archived by the owner on Sep 4, 2026. It is now read-only.

docs: deprecate the loader and link the migration example - #234

Merged
alexander-akait merged 1 commit into
mainfrom
docs/deprecation-notice
Sep 4, 2026
Merged

docs: deprecate the loader and link the migration example#234
alexander-akait merged 1 commit into
mainfrom
docs/deprecation-notice

Conversation

@alexander-akait

Copy link
Copy Markdown
Member

Summary

webpack shims these modules without a loader: ProvidePlugin binds a name the module only reads, and the add-imports example does the rest — the side-effect require and the wrapper — with the NormalModule.processResult hook, in a plugin that fits in the configuration. This marks the loader deprecated and adds a per-option migration table pointing there. Depends on webpack/webpack#21948, which adds that example.

What kind of change does this PR introduce?

docs — README only, no behavior change.

Did you add tests for your changes?

No; nothing executable changed. prettier and cspell are clean on the file.

Does this PR introduce a breaking change?

No. Whether the loader also starts warning at build time, and when the package gets npm deprecate, is a separate call.

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

The webpack.js.org Shimming guide still recommends this loader and should point at the example instead.

Use of AI

Claude Code drafted the notice and the migration table under my direction, and I reviewed it. The table's claims were checked against real builds during the investigation behind webpack/webpack#21948 — including that ProvidePlugin hoists its binding above the module body, so it preserves this loader's ordering.


🤖 Generated with Claude Code

https://claude.ai/code/session_01XVjgpHQ9f9sBG3KTdwxAkK


Generated by Claude Code

webpack shims these modules without a loader: ProvidePlugin binds a name the
module only reads, and the add-imports example does the rest — the side-effect
require and the wrapper — with the NormalModule processResult hook, in a plugin
that fits in the configuration.
@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.96%. Comparing base (dc67bf0) to head (cdea13e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #234   +/-   ##
=======================================
  Coverage   91.96%   91.96%           
=======================================
  Files           3        3           
  Lines         224      224           
  Branches       87       87           
=======================================
  Hits          206      206           
  Misses         12       12           
  Partials        6        6           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alexander-akait
alexander-akait merged commit a5ec0d5 into main Sep 4, 2026
19 checks passed
@alexander-akait
alexander-akait deleted the docs/deprecation-notice branch September 4, 2026 07:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant