1

I use the npm package service-worker-loader. I get this waring when building the project:

node:25260) [DEP_WEBPACK_COMPILATION_CACHE] DeprecationWarning: Compilation.cache was removed in favor of Compilation.getCache()

I have discovered through using:

node --trace-deprecation node_modules/webpack/bin/webpack.js --mode=development

That the problem is in the following code:

onCompilerHook(compiler, 'compilation', compilation => {
  if (compilation.cache) {
    if (!compilation.cache[subCache]) {
      compilation.cache[subCache] = {};
    }

    compilation.cache = compilation.cache[subCache];
  }
});

I am using the latest version (4.0.2) of the package. Was that deprecation fixed? Is there any possible fix?

Ivan Rubinson
  • 3,001
  • 4
  • 19
  • 48
Elena Alexeenko
  • 100
  • 4
  • 13

0 Answers0