From 56cc841b6586d194dc738ba96adc1bdc55576e4a Mon Sep 17 00:00:00 2001 From: Gusted Date: Sat, 5 Apr 2025 12:49:14 +0000 Subject: [PATCH] chore: always enable webpack progress (#7463) - Webpack is currently quite slow while compiling the whole frontend, even for a very fast machine this can take 30s, but for normal machines this can take over a minute. In the development mode (`make watch`) a handy status is shown that tells what webpack is doing and an approximate progress. - Enable this progress always, this means that this is now also shown when you run `make build` and should hopefully give a good indication how long the webpack step should take. - Configure the progress to also show the module its currently 'working on'. This is more interesting than the amount of modules webpack still needs to work on (which steadily increase as webpack seems to incrementally resolves to more modules). ## Screenshot ![image](/attachments/96b1176a-6a6b-4a44-a8f3-fb56ce7b0fc6) Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7463 Reviewed-by: Earl Warren Co-authored-by: Gusted Co-committed-by: Gusted --- webpack.config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 4662a30db5..7689e629c7 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -16,7 +16,7 @@ import tailwindcssNesting from 'tailwindcss/nesting/index.js'; import postcssNesting from 'postcss-nesting'; const {EsbuildPlugin} = EsBuildLoader; -const {SourceMapDevToolPlugin, DefinePlugin} = webpack; +const {SourceMapDevToolPlugin, DefinePlugin, ProgressPlugin} = webpack; const formatLicenseText = (licenseText) => wrapAnsi(licenseText || '', 80).trim(); const baseDirectory = dirname(fileURLToPath(new URL(import.meta.url))); @@ -233,6 +233,9 @@ export default { ], }, plugins: [ + new ProgressPlugin({ + activeModules: true, + }), new webpack.ProvidePlugin({ // for htmx extensions htmx: 'htmx.org', }),