Webpack progress mode with serverless-offline?
Hi, thanks for your work on the plugin,
This is a question / bug report?
Description
- What went wrong?
I use serverless-webpack with serverless-offline.
All works well, launched with this command: $ npx serverless offline --port 9080.
But when I perform a change in my code, webpack build the code but didn't give any information on progress, which can take time when I'm working with many lambda functions.
- What did you expect should have happened?
I would like to have the same behavior as when I use webpack outside of serverless, with the cli option --progress.
I've searched in the docs but can't find any information on this.
- What was the config you used?
Nothing fancy.
Additional Data
-
Serverless-Webpack Version you're using:
5.3.1 -
Webpack version you're using:
4.40.2 -
Serverless Framework Version you're using:
1.52.1 -
Operating System: Occurs on
macOSandUbuntu 19.04- dodn't tested elsewhere.
Thanks in advance,
Can you try adding the ProgressPlugin into your serverless webpack configs file if it detects --progress passed as a CLI param? Or just remove the argument check and always include the webpack.ProgressPlugin plugin.
// serverless.webpack.config.js
const webpack = require("webpack");
module.exports = {
/* .. */
plugins: [
process.argv.includes('--progress') && new webpack.ProgressPlugin((percentage, message, ...args) => {
// e.g. Output each progress message directly to the console:
console.info(percentage, message, ...args);
})
].filter(Boolean),
/* .. */
};