LeComptoirDesPharmacies / offline-plugin

Offline plugin (ServiceWorker, AppCache) for webpack (https://webpack.js.org/)
MIT License
14 stars 14 forks source link

Depreciation warning with webpack 5 #5

Open LeComptoirDesPharmacies opened 3 years ago

LeComptoirDesPharmacies commented 3 years ago

@Enase https://github.com/Enase

Reported to us this depreciation warning :

@LeComptoirDesPharmacies Unfortunately it's not possible to create issue in your github repo. There is an issue while webpack build with your implementation:

(node:18736) [DEP_WEBPACK_COMPILATION_CACHE] DeprecationWarning: Compilation.cache was removed in favor of Compilation.getCache()
    at compilationFn (......./node_modules/@lcdp/offline-plugin/lib/service-worker.js:142:25)
    at _next36 (eval at create (......../node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:50:1)
    at _next14 (eval at create (......../node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:97:1)

and

BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation.
  Do changes to assets earlier, e. g. in Compilation.hooks.processAssets.
  Make sure to select an appropriate stage from Compilation.PROCESS_ASSETS_STAGE_*.
    at ServiceWorker.apply (....../node_modules/@lcdp/offline-plugin/lib/service-worker.js:192:35)

This disscution on html-webpack-plugin could help us => https://github.com/jantimon/html-webpack-plugin/issues/1527

We started to work on this depreciation warning here => https://github.com/LeComptoirDesPharmacies/offline-plugin/tree/bugfix/webpack5-depreciation-warning

palarnab commented 3 years ago

I get this error even after using:

"html-webpack-plugin": "^5.3.1", "webpack": "^5.38.1"

and npm install.

Any help would be welcome

bisserof commented 3 years ago

Hi, @LeComptoirDesPharmacies! Are there any updates?

LeComptoirDesPharmacies commented 3 years ago

Hi, this warning still here and still non-blocking with :

"html-webpack-plugin": "5.3.1",
"webpack": "5.34.0"

Apparently it break on a certain webpack version (thanks to @palarnab), as we continuously update our dependencies we should fix this issue soon.

Yours faithfully, LCDP

pistachiomatt commented 2 years ago

Any update on this? I'm still seeing the message with the latest build.