Skip to content

Resolve the plopfile passed with --plopfile - #2379

Merged
webpro merged 3 commits into
webpro-nl:mainfrom
everton-dgn:fix/plop-plopfile-arg
Nov 20, 2026
Merged

webpro merged 3 commits into
webpro-nl:mainfrom
everton-dgn:fix/plop-plopfile-arg

Conversation

@everton-dgn

@everton-dgn everton-dgn commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

With plop --plopfile generators/plopfile.js in a script, as in React-Avancado/boilerplate, the plopfile was reported as unused. The Plop plugin only had the default plopfile.{cjs,mjs,js,ts} entry.

Plop passes --plopfile to Liftoff as configPath (source), so the plugin now reads it with args.config. It's the separate change mentioned in the #2303 review.

@pkg-pr-new

pkg-pr-new Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/knip@2379
npm i https://pkg.pr.new/@knip/language-server@2379
npm i https://pkg.pr.new/@knip/mcp@2379

commit: faa92a6

@everton-dgn
everton-dgn marked this pull request as ready for review November 17, 2026 09:25

@webpro webpro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Éverton! Keeping generators in a folder and running them with plop --plopfile generators/plopfile.js is a common setup, as in the React Avançado boilerplate, and the plopfile and everything it imports were reported as unused. Reading --plopfile with args.config treats it like the default plopfile.

@webpro
webpro merged commit 9a0b996 into webpro-nl:main Nov 20, 2026
33 checks passed
@webpro

webpro commented Nov 20, 2026

Copy link
Copy Markdown
Member

🚀 This pull request is included in v6.47.0. See Release 6.47.0 for release notes.

Using Knip in a commercial project? Please consider becoming a sponsor.

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