Skip to content

webpack: Drop support for v4 - #1817

Merged
askoufis merged 2 commits into
masterfrom
drop-webpack-4
Nov 22, 2026
Merged

askoufis merged 2 commits into
masterfrom
drop-webpack-4

Conversation

@askoufis

@askoufis askoufis commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor
  • Drop webpack v4 support
  • Remove webpack v4 compat code
  • Raise wepback peer dep range to ^5.73.0 so we can use newer inbuilt APIs and drop the loader-utils dep

We never tested the plugin against webpack v4, so there's nothing in the test suite to remove.

- Set `peerDependencies.webpack` to `^5.20.2`
- Remove `src/compat.ts` and the webpack 4 code paths in `compiler.ts` and `plugin.ts`
- Remove the unused `@types/mini-css-extract-plugin` (v1) devDependency from `test-helpers`
- Add a `major` changeset
- Use `this.getOptions()` instead of `loaderUtils.getOptions()`
- Use `this.utils.contextify()` wrapped in `JSON.stringify()` instead of `loaderUtils.stringifyRequest()`
- Remove the `loader-utils` dependency
- Raise the `webpack` peer dependency minimum to `^5.73.0` (required for `this.getOptions()`)
- Update the changeset
@changeset-bot

changeset-bot Bot commented Nov 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8ba1ef8

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

This PR includes changesets to release 2 packages
Name Type
@vanilla-extract/webpack-plugin Major
@vanilla-extract/next-plugin 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

@askoufis
askoufis merged commit 1d9ffc3 into master Nov 22, 2026
7 checks passed
@askoufis
askoufis deleted the drop-webpack-4 branch November 22, 2026 11: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