Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

stats-webpack-plugin produces deprecation warning with webpack v5 #38

@lucaswerkmeister

Description

@lucaswerkmeister

To reproduce in a minimal project:

git clone https://github.com/lucaswerkmeister/repro-stats-webpack-plugin-webpack5.git
cd repro-stats-webpack-plugin-webpack5
npm install
npm run build

The result looks like this:


> repro-stats-webpack-plugin-webpack5@1.0.0 build /tmp/repro-stats-webpack-plugin-webpack5                                                        
> node --trace-deprecation node_modules/.bin/webpack                                                                                              

(node:54335) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: Compilation.assets will be frozen in future, all modifications are deprecated.  
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 /tmp/repro-stats-webpack-plugin-webpack5/node_modules/stats-webpack-plugin/index.js:21:32
    at Hook.eval [as callAsync] (eval at create (/tmp/repro-stats-webpack-plugin-webpack5/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:7:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/tmp/repro-stats-webpack-plugin-webpack5/node_modules/tapable/lib/Hook.js:18:14)
    at Compiler.emitAssets (/tmp/repro-stats-webpack-plugin-webpack5/node_modules/webpack/lib/Compiler.js:763:19)
    at /tmp/repro-stats-webpack-plugin-webpack5/node_modules/webpack/lib/Compiler.js:412:10
    at processTicksAndRejections (node:internal/process/task_queues:75:11)
[webpack-cli] Compilation finished
asset stats.json 3.59 KiB [compared for emit]
asset main.js 0 bytes [compared for emit] [minimized] (name: main)
./src/index.js 1 bytes [built] [code generated]
webpack 5.3.1 compiled successfully in 169 ms

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions