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
What is the expected behavior?
\nI 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.
\nOther relevant information:
\nwebpack version: 5.99.8
\nNode.js version: 18.20.0
\nOperating System: MacOS
\nAdditional tools:
@JerryLyu93 it means somewhere you have require(\"./package.json\")
, we analyze all require
/import
in files which you use in buildDependencies
including nested files
-
This might be more of a misunderstanding on my part. Bug reportWhat is the current behavior? If the current behavior is a bug, please provide the steps to reproduce. I have manually specified buildDependencies, which does not include package.json. However, if I only modify the version in package.json (which does not involve any dependency changes), all dependencies are still discarded. Webpack Cache Config: {
type: 'filesystem',
version: '31098c07c1e6ee6f0124f2f0ee5de6aa',
cacheDirectory: 'my-project/.webpack-cache',
store: 'pack',
buildDependencies: {
config: [
'my-project/node_modules/react-scripts/config/webpack.config.js',
'my-project/dev-configs/config-overrides/bundle.js',
'my-project/dev-configs/config-overrides/debug.js',
'my-project/dev-configs/config-overrides/index.js',
'my-project/dev-configs/config-overrides/performance.js',
'my-project/dev-configs/config-overrides/transform-imports.js',
'my-project/dev-configs/config-overrides/utils.js',
'my-project/apps/go/config-overrides.js'
],
tsconfig: [
'my-project/apps/go/tsconfig.json'
]
},
name: 'go'
} When I build after change package.json version:
What is the expected behavior? 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. Other relevant information: |
Beta Was this translation helpful? Give feedback.
-
@JerryLyu93 it means somewhere you have |
Beta Was this translation helpful? Give feedback.
@JerryLyu93 it means somewhere you have
require("./package.json")
, we analyze allrequire
/import
in files which you use inbuildDependencies
including nested files