FreemenL / webpack-build-log-plugin

friendly display compilation details
1 stars 1 forks source link

Cannot add property printFileSizesAfterBuildHook, object is not extensible #2

Open andi2233i opened 1 year ago

andi2233i commented 1 year ago

[webpack-cli] TypeError: Cannot add property printFileSizesAfterBuildHook, object is not extensible at WebpackBuildLogPlugin.mountHook (D:\wangyi\code\code\nulink\code\nulink-sdk\node_modules\webpack-build-log-plugin\src\index.js:35:49) at WebpackBuildLogPlugin.apply (D:\wangyi\code\code\nulink\code\nulink-sdk\node_modules\webpack-build-log-plugin\src\index.js:24:10) at createCompiler (D:\wangyi\code\code\nulink\code\nulink-sdk\node_modules\webpack\lib\webpack.js:73:12) at create (D:\wangyi\code\code\nulink\code\nulink-sdk\node_modules\webpack\lib\webpack.js:134:16) at webpack (D:\wangyi\code\code\nulink\code\nulink-sdk\node_modules\webpack\lib\webpack.js:142:47) at WebpackCLI.f [as webpack] (D:\wangyi\code\code\nulink\code\nulink-sdk\node_modules\webpack\lib\index.js:55:16) at WebpackCLI.createCompiler (D:\wangyi\code\code\nulink\code\nulink-sdk\node_modules\webpack-cli\lib\webpack-cli.js:1647:29) at async WebpackCLI.runWebpack (D:\wangyi\code\code\nulink\code\nulink-sdk\node_modules\webpack-cli\lib\webpack-cli.js:1738:20) at async Command. (D:\wangyi\code\code\nulink\code\nulink-sdk\node_modules\webpack-cli\lib\webpack-cli.js:885:21) at async Command.parseAsync (D:\wangyi\code\code\nulink\code\nulink-sdk\node_modules\webpack-cli\node_modules\commander\lib\command.js:935:5)

andi2233i commented 1 year ago

I use in webpack 5.64.4 webpack.config.js ........ plugins: [ new WebpackBuildLogPlugin({ path: path.join(process.cwd(), "log"), filename: "compile-log.md", deleteFile: process.env.NODE_ENV == "production", })]