Skip to content

fix: MCD-1295 Declare minimatch as a runtime dependency. - #222

Merged
fago merged 1 commit into
1.xfrom
fix/declare-minimatch-dependency
Aug 7, 2026
Merged

fix: MCD-1295 Declare minimatch as a runtime dependency.#222
fago merged 1 commit into
1.xfrom
fix/declare-minimatch-dependency

Conversation

@drubot

@drubot drubot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

minimatch is imported at runtime in src/runtime/server/utils/generateComponentIndex.ts (bundled into dist/module.mjs, executed during nuxt prepare), but was only declared in devDependencies. Consumers therefore resolve whatever minimatch happens to be hoisted to their top-level node_modules/ — a phantom dependency.

When the hoisted copy is minimatch ≤5 (CJS-only, no named export), nuxt prepare fails with:

[error] Named export 'minimatch' not found. The requested module 'minimatch' is a
CommonJS module, which may not support all module.exports as named exports.
  at async Array.<anonymous> (node_modules/nuxt-component-preview/dist/module.mjs:141:44)

Moving minimatch from devDependencies to dependencies guarantees an ESM-capable ≥10 copy resolves for the module's import.


Drafted with Claude Code.

@fago
fago merged commit 6b80266 into 1.x Aug 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants