ncc icon indicating copy to clipboard operation
ncc copied to clipboard

webpack5 cache not working as expected

Open willson-wang opened this issue 3 years ago • 0 comments

Using [email protected] version, this is a reproduction demo Step 1: git clone demo Step 2: yarn install Step 3: Modify infrastructureLogging in node_modules/@vercel/ncc/dist/ncc/index.js.cache.js: {debug: /webpack.cache/} to print the webpack cache log Step 4: yarn build executes the first build Step 5: Without making any file changes, yarn build executes the second build Step 6: Without making any file changes, yarn build executes the third build

You will find that after the second time, the build cache will change every time. You can see from the cache log [but build dependencies have changed.] image

The expected result is that webpack5 cache can work as expected, and the cache will not be reused every time it is built.

willson-wang avatar Aug 30 '23 06:08 willson-wang