Skip to content

Update mini-css-extract-plugin to 2.10.2#91985

Open
Mad-Kat wants to merge 1 commit intovercel:canaryfrom
Mad-Kat:update-mini-css-extract-plugin
Open

Update mini-css-extract-plugin to 2.10.2#91985
Mad-Kat wants to merge 1 commit intovercel:canaryfrom
Mad-Kat:update-mini-css-extract-plugin

Conversation

@Mad-Kat
Copy link
Copy Markdown

@Mad-Kat Mad-Kat commented Mar 27, 2026

What?

Update bundled mini-css-extract-plugin from v2.4.4 to v2.10.2

Why?

mini-css-extract-plugin's importModule does not use matchResource when available, causing CSS url() imports to resolve against the wrong context when a loader uses !=! (matchResource) syntax to emit CSS.

Fixed upstream in webpack/mini-css-extract-plugin#1162.

How?

  • Updated the dependency version in packages/next/package.json
  • Recompiled the bundled output in src/compiled/mini-css-extract-plugin/
  • Removed cjs.js and hmr/ directory (no longer needed in v2.10+)
  • Added an ncc compilation step in taskfile.js for the top-level hotModuleReplacement.js (v2.10+ loader references it from __dirname directly instead of hmr/)

Fixes #91984

@nextjs-bot
Copy link
Copy Markdown
Collaborator

Allow CI Workflow Run

  • approve CI run for commit: 829157f

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

1 similar comment
@nextjs-bot
Copy link
Copy Markdown
Collaborator

Allow CI Workflow Run

  • approve CI run for commit: 829157f

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CSS url() imports resolve incorrectly when using matchResource (!=!) with mini-css-extract-plugin

2 participants