Hi,
When i build for production with the command below, i have the webpack results in a table.
npm run production
Where script is:
cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --config=node_modules/laravel-mix/setup/webpack.config.js
How could i hide the table below and just show "Compiled Successfully in xxxx ms"
Laravel Mix v6.0.6
β Compiled Successfully in 13063ms
βββββββββββββββββββββββββββββββββββββ¬βββββββββββ
β File β Size β
βββββββββββββββββββββββββββββββββββββΌβββββββββββ€
β fonts/vendor/@fortawesome/fontawβ¦ β 896 KiB β
βββββββββββββββββββββββββββββββββββββΌβββββββββββ€
β fonts/vendor/@fortawesome/fontawβ¦ β 730 KiB β
βββββββββββββββββββββββββββββββββββββΌβββββββββββ€
β /js/app.js β 310 KiB β
βββββββββββββββββββββββββββββββββββββΌβββββββββββ€
β css/app.css β 290 KiB β
βββββββββββββββββββββββββββββββββββββΌβββββββββββ€
................................
Thanks for you help
I don't think we currently expose an option to hide that. You're the only person I've seen request it, so I'm not sure it's overly necessary.
We have a logging function in our CI/CD process which has a fairly low limit on the number of bytes it stores, so having the option to disable the output table at the end would be very helpful in that case, since otherwise errors later in the CI process get hidden because the table takes up a lot of space.
In Mix 5 the output was hidden in our production deployments, and I was sad to see no option to disable it in 6.
I might be the second person.
I have two .copy() processes in my build.
That means that I end up with a table that's about two screens-high of image filenames.
The previous version discarded this information and I only saw the affected files.
( It also did a clear so it was more of a status panel )
Can I, at the very least, choose "which processes" to exclude from that table?
It also doesn't say "when" it concluded so I'm never sure which of the humongous lists were the last ones when trying to scroll up (because of the lack of clearing the terminal).
Hello,
same issue here,
the new table is unusable, nearly 50+ rows,
every file is listed, woff2 / css / json / svg and so on
β Compiled Successfully in 80995ms
β/css/iconfont.css β 12.9 KiB β
βicons/fonts/MaterialIcons-Regular.eot β 91.6 KiB β
βicons/fonts/MaterialIcons-Regular.json β 42.2 KiB β
βicons/fonts/MaterialIcons-Regular.ttf β 225 KiB β
βicons/fonts/MaterialIcons-Regular.woff β 103 KiB β
βicons/fonts/MaterialIcons-Regular.woff2 β 80.6 KiB β
βicons/material-icons.css β 98.1 KiB β
β/css/prism-tomorrow.css β 1.72 KiB β
β/css/framework.css β 189 KiB β
β/fonts/MaterialIcons-Regular.woff β 77.7 KiB β
β/fonts/brandon-grotesque-medium.otf β 87.5 KiB β
β/fonts/feather.eot β 60.6 KiB β
β/fonts/feather.svg β 209 KiB β
β/fonts/feather.ttf β 60.5 KiB β
β/fonts/feather.woff β 28.8 KiB β
β/js/app.js β 1.5 MiB β
β/js/manifest.js β 15.5 KiB β
β/js/vendor.js β 10.9 MiB β
βcss/app.css β 74.2 KiB β
βcss/main.css β 1.56 MiB β
βc576abad9184bbb211ea6e64eb39d2e3 β 6.02 KiB β
βjs/chunks/ag-grid.js β 6.02 MiB β
βjs/chunks/module18.js β 3.22 MiB β
βjs/chunks/module17/form.js β 1.57 MiB β
βjs/chunks/module16/index.js β 1.04 MiB β
βjs/chunks/module15/form.js β 3.3 MiB β
βjs/chunks/module14/index.js β 1.21 MiB β
βjs/chunks/fabric.js β 2.49 MiB β
βjs/chunks/filestack.js β 668 KiB β
βjs/chunks/module12.js β 109 KiB β
βjs/chunks/module12b.js β 63 KiB β
βjs/chunks/module11.js β 1.14 MiB β
βjs/chunks/module10.js β 89.3 KiB β
βjs/chunks/pdfjs-dist.js β 1010 KiB β
βjs/chunks/module9.js β 1.11 MiB β
βjs/chunks/module8/diagnostic.js β 977 KiB β
βjs/chunks/module8/form.js β 1.11 MiB β
βjs/chunks/module8/index.js β 945 KiB β
βjs/chunks/module8/order.js β 1.09 MiB β
βjs/chunks/module8/stat.js β 63 KiB β
βjs/chunks/module7.js β 119 KiB β
βjs/chunks/module6.js β 1.16 MiB β
βjs/chunks/module5/form.js β 1.9 MiB β
βjs/chunks/module4/index.js β 1.24 MiB β
βjs/chunks/module3.js β 20.1 KiB β
βjs/chunks/module2.js β 2.04 MiB β
βjs/chunks/module1.js β 4.16 MiB β
βpdf.worker.worker.js β 3.4 MiB β
I had the same issue when using a package that copied a few hundred images to the public folder. Mix would just print every single file on every compilation. I invested some time since it was really annoying.
Turns out you can simply add an event hook and overwrite the assets object.
mix.after((stats) => {
stats.compilation.assets = {}
})
This however prevents mix from displaying any files at all.
If you only want to remove unimportant files like images you can just do this.
mix.after((stats) => {
const assets = { ...stats.compilation.assets }
stats.compilation.assets = {}
for (const [path, asset] of Object.entries(assets)) {
if (path.endsWith('.js')) {
stats.compilation.assets[path] = asset
}
}
})
Since you get the whole target path of the asset you can also filter them based on their destination folder or use a regex to apply a more complex filter logic.
I'm gonna re-open this. I think showing 100s of files is overkill and we need at least some way to filter them. Also we need to investigate if we can show only changed files when watching.
I won't have the time to put forth to this today (maybe this week?) but we'd definitely welcome a PR and I'll be more than happy to help whoever work through it.
Most helpful comment
I had the same issue when using a package that copied a few hundred images to the public folder. Mix would just print every single file on every compilation. I invested some time since it was really annoying.
Turns out you can simply add an event hook and overwrite the assets object.
This however prevents mix from displaying any files at all.
If you only want to remove unimportant files like images you can just do this.
Since you get the whole target path of the asset you can also filter them based on their destination folder or use a regex to apply a more complex filter logic.