Skip to content
\n

When I build after change package.json version:

\n
...\n[webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] **/**/apps/go/package.json invalidated because hashes differ (2ff3eb40e39aa12c4653911ac2cec26b != 48ab5c04ed5af4e365e6fa6287cccf7c)\n...\n
\n

What is the expected behavior?

\n

I hope that when I specify buildDependencies, only the files specified by that value will be considered. If I want to monitor package.json, I can add it manually, or add yarn.lock.

\n

Other relevant information:
\nwebpack version: 5.99.8
\nNode.js version: 18.20.0
\nOperating System: MacOS
\nAdditional tools:

","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

@JerryLyu93 it means somewhere you have require(\"./package.json\"), we analyze all require/import in files which you use in buildDependencies including nested files

","upvoteCount":1,"url":"https://github.com/webpack/webpack/discussions/19538#discussioncomment-13170714"}}}

Webpack Cache PackFileCacheStrategy always care package.json #19538

Answered by alexander-akait
JerryLyu93 asked this question in Q&A
Discussion options

You must be logged in to vote

@JerryLyu93 it means somewhere you have require("./package.json"), we analyze all require/import in files which you use in buildDependencies including nested files

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@JerryLyu93
Comment options

@alexander-akait
Comment options

@JerryLyu93
Comment options

@JerryLyu93
Comment options

@JerryLyu93
Comment options

Answer selected by JerryLyu93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #19537 on May 16, 2025 12:51.