Webpack plugin - webpack.config.js file & warning message - The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment

Hello Experts,

I am using webpack plugin to store node modules in the root directory and not require a package.json per child-stack.

I’ve got a warning message informing that web pack mode was not set. I can manually set it in the webpack.config.js file but I’d like use serverless deploy stage to set this value dynamically.

Here is my webpack.config.js file:

module.exports = {
target: ‘node’,
mode: ‘development’,
entry: slsw.lib.entries,
externals: [nodeExternals({
modulesDir: path.join(__dirname, ‘…/…/node_modules’),

Is it possible set the mode during deploy creation time?

Thanks in advanced.