chore: always enable webpack progress

- 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).
This commit is contained in:
Gusted 2025-04-04 16:25:06 +02:00
parent c977585e4c
commit 700a4b5d7f
No known key found for this signature in database
GPG key ID: FD821B732837125F

View file

@ -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',
}),