media-query-plugin
media-query-plugin copied to clipboard
DeprecationWarning: afterOptimizeChunkAssets is deprecated
Not sure if it's worth opening an issue for this...
Anyway.. with Webpack 5.23.0 I get this DeprecationWarning:
(node:98245) [DEP_WEBPACK_COMPILATION_AFTER_OPTIMIZE_CHUNK_ASSETS] DeprecationWarning: afterOptimizeChunkAssets is deprecated (use Compilation.hook.processAssets instead and use one of Compilation.PROCESS_ASSETS_STAGE_* as stage option)
at /.../node_modules/media-query-plugin/src/plugin.js:243:60
at Hook.eval [as call] (eval at create (/.../node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:9:1)
at Hook.CALL_DELEGATE [as _call] (/.../node_modules/tapable/lib/Hook.js:14:14)
at Compiler.newCompilation (/.../node_modules/webpack/lib/Compiler.js:992:30)
at /.../node_modules/webpack/lib/Compiler.js:1035:29
at Hook.eval [as callAsync] (eval at create (/.../node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/.../node_modules/tapable/lib/Hook.js:18:14)
at Compiler.compile (/.../node_modules/webpack/lib/Compiler.js:1030:28)
at /.../node_modules/webpack/lib/Compiler.js:473:12
at Compiler.readRecords (/.../node_modules/webpack/lib/Compiler.js:871:11)
The same problem with Webpack 4.46.0
I received such error. I had to rollback to v1.4.0.
(node:36) [DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET] DeprecationWarning: chunk.files was changed from Array to Set (using Array method 'reduce' is deprecated)
Error: Chunk.modulesSizeThere was no ChunkGraph assigned to the Chunk for backward-compat (Use the new API)
at /var/www/node_modules/media-query-plugin/node_modules/webpack/lib/ChunkGraph.js:1621:12
at deprecated (internal/util.js:89:15)
at Function.getChunkGraphForChunk (/var/www/node_modules/media-query-plugin/node_modules/webpack/lib/ChunkGraph.js:1631:10)
at Chunk.modulesSize (/var/www/node_modules/media-query-plugin/node_modules/webpack/lib/Chunk.js:299:33)
at /var/www/node_modules/webpack/lib/Stats.js:660:18
at Array.map (<anonymous>)
at Stats.toJson (/var/www/node_modules/webpack/lib/Stats.js:633:36)
at CleanWebpackPlugin.handleDone (/var/www/node_modules/clean-webpack-plugin/dist/clean-webpack-plugin.js:155:26)
at /var/www/node_modules/clean-webpack-plugin/dist/clean-webpack-plugin.js:100:14
at AsyncSeriesHook.eval [as callAsync] (eval at create (/var/www/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
at AsyncSeriesHook.lazyCompileHook (/var/www/node_modules/tapable/lib/Hook.js:154:20)
at /var/www/node_modules/webpack/lib/Compiler.js:304:22
at Compiler.emitRecords (/var/www/node_modules/webpack/lib/Compiler.js:499:39)
at /var/www/node_modules/webpack/lib/Compiler.js:298:10
at /var/www/node_modules/webpack/lib/Compiler.js:485:14
at AsyncSeriesHook.eval [as callAsync] (eval at create (/var/www/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
at AsyncSeriesHook.lazyCompileHook (/var/www/node_modules/tapable/lib/Hook.js:154:20)
at /var/www/node_modules/webpack/lib/Compiler.js:482:27
at /var/www/node_modules/neo-async/async.js:2818:7
at done (/var/www/node_modules/neo-async/async.js:3522:9)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/var/www/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at /var/www/node_modules/webpack/lib/Compiler.js:464:33
at /var/www/node_modules/media-query-plugin/node_modules/graceful-fs/graceful-fs.js:61:14
at /var/www/node_modules/graceful-fs/graceful-fs.js:45:10
at FSReqCallback.oncomplete (fs.js:163:23)
(node:36) [DEP_WEBPACK_CHUNK_MODULES_SIZE] DeprecationWarning: Chunk.modulesSize: Use new ChunkGraph API
- Webpack - v4.46.0
- media-query-plugin - v1.5.0
Is there already some plan to fix it in Webpack 5 ? @SassNinja