Why can't my Webpack5 configuration use filesystem cache in production mode?

Viewed 467

I have upgraded to Webpack5.11 and my node version is v10.15.3 and windows10. The production mode compiles normally without the cache configuration, but after I used the following configuration, I was unable to generate the cache file in the directory I expected. But it can be generated in the development mode. I mean, does production mode not support file caching? I intend to apply Webpack5's persistent cache to CI to speed up CI builds.

cache: {
        name:"testCache",
        type: 'filesystem',
        cacheDirectory: path.resolve(paths.cachePath,'webpack'),
}
0 Answers
Related