webpack-encore icon indicating copy to clipboard operation
webpack-encore copied to clipboard

Verbose logs from --profile hidden, not shown

Open sandermarechal opened this issue 2 years ago • 2 comments

When I run encore using the --profile option, I still don't see any extra logs. Example:

> encore production --profile

Running webpack ...

 DONE  Compiled successfully in 30081ms                                                                                                                                   9:58:34 AM

2961 files written to HTML/build
assets by path ckeditor/plugins/ 2.3 MiB 2628 assets
assets by info 13.5 MiB [immutable] 106 assets
assets by path ckeditor/skins/ 1.1 MiB 71 assets
assets by path ckeditor/lang/ 898 KiB
  asset ckeditor/lang/km.js 21.6 KiB [emitted] [from: ckeditor/lang/km.js?copy-files-loader] [minimized] (auxiliary name: _tmp_copy)
  + 70 assets
assets by path dropzone/ 198 KiB 17 assets
assets by path ckeditor/*.js 655 KiB
  asset ckeditor/ckeditor.js 652 KiB [emitted] [from: ckeditor/ckeditor.js?copy-files-loader] [minimized] [big] (auxiliary name: _tmp_copy)
  asset ckeditor/styles.js 2.56 KiB [emitted] [from: ckeditor/styles.js?copy-files-loader] [minimized] (auxiliary name: _tmp_copy)
  asset ckeditor/config.js 661 bytes [emitted] [from: ckeditor/config.js?copy-files-loader] [minimized] (auxiliary name: _tmp_copy) 1 related asset
asset manifest.json 275 KiB [compared for emit] [big]
asset ckeditor/vendor/promise.js 6 KiB [emitted] [from: ckeditor/vendor/promise.js?copy-files-loader] [minimized] (auxiliary name: _tmp_copy)
asset ckeditor/adapters/jquery.js 2.92 KiB [emitted] [from: ckeditor/adapters/jquery.js?copy-files-loader] [minimized] (auxiliary name: _tmp_copy)
asset ckeditor/contents.css 1.78 KiB [emitted] [from: ckeditor/contents.css?copy-files-loader] [minimized] (auxiliary name: _tmp_copy)
orphan modules 748 KiB [orphan] 79 modules
runtime modules 3.71 KiB 10 modules
modules by path ./node_modules/ckeditor4/plugins/ 211 KiB 2628 modules
modules by path ./node_modules/ckeditor4/lang/ 4.41 KiB 71 modules
modules by path ./node_modules/ckeditor4/skins/ 5.71 KiB 71 modules
modules by path ./src/Prezent/ 775 KiB (javascript) 407 KiB (css/mini-extract) 61 modules
modules by path ./node_modules/dropzone/ 120 KiB 18 modules
modules by path ./node_modules/jquery-ui/ui/ 177 KiB 12 modules
modules by path ./app/Resources/assets/ 6.32 KiB (javascript) 620 KiB (css/mini-extract) 8 modules
modules by path ./node_modules/foundation-sites/js/foundation/*.js 93.1 KiB 8 modules
modules by path *.* 131 KiB 6 modules
modules by path ./node_modules/jquery-ui-timepicker-addon/dist/ 56.7 KiB 3 modules
modules by path ./node_modules/ckeditor4/*.js 188 bytes 3 modules
modules by path ./node_modules/@fullcalendar/ 26.9 KiB 2 modules
+ 18 modules

LOG from webpack.Compilation.ModuleProfile
<i> 2441 ms build modules
+ 86 hidden lines

It seems like all the extra profile lines are hidden again, see the 86 hidden lines at the end.

sandermarechal avatar Mar 24 '22 10:03 sandermarechal

It may be related to this line: https://github.com/symfony/webpack-encore/blob/b26a169335e8daf13d9b8431e0b60aa77b81e4af/lib/config-generator.js#L545

We should possibly be avoiding silencing the stats if the output is json OR if --profile is passed. PR welcome :)

weaverryan avatar May 05 '22 23:05 weaverryan

I just got lost down a rabbit hole on this one too. :rabbit:

It turns out it just requires --stats verbose to be added.

See https://github.com/webpack/webpack/discussions/14016#discussioncomment-1199902 onwards.

GwendolenLynch avatar Oct 21 '22 09:10 GwendolenLynch