You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be very effective if serverless-webpack respected the Webpack configuration for watch, this would make it not only consistent but easy to disable watch dynamically on a large number of serverless packages. Alternatively being able to disable watch via an env variable would also be pretty good.
Example implementations:
// wpwatch.jsif(this.webpackConfig.watch===false){// If we do not watch we will just run an ordinary compileif(!this.log){this.serverless.cli.log('Watch disabled by Webpack.');}returnthis.serverless.pluginManager.spawn('webpack:compile');}
and / or
// wpwatch.jsif(process.env.CI){// If we do not watch we will just run an ordinary compileif(!this.log){this.serverless.cli.log('Watch disabled by detecting CI environment.');}returnthis.serverless.pluginManager.spawn('webpack:compile');}
This would be useful for us, and potentially others that are also running many serverless offlines in a CI environment for integration tests, but adding in the --webpack-no-watch to serverless offline adds a lot of extra npm scripts for just the CI environment, this lets devs disable it globally without touching the npm scripts.
It also makes it less confusing on why watching isn't properly being disabled.
Similar or dependent issue(s):
N/A
Additional Data
Serverless-Webpack Version you're using: 5.6.1
Webpack version you're using: 4
Serverless Framework Version you're using: v2
Operating System: Linux
Stack Trace (if available): N/A
The text was updated successfully, but these errors were encountered:
This is a Feature Proposal
Description
It would be very effective if
serverless-webpack
respected the Webpack configuration forwatch
, this would make it not only consistent but easy to disable watch dynamically on a large number of serverless packages. Alternatively being able to disable watch via anenv
variable would also be pretty good.Example implementations:
and / or
This would be useful for us, and potentially others that are also running many
serverless offline
s in a CI environment for integration tests, but adding in the--webpack-no-watch
toserverless offline
adds a lot of extra npm scripts for just the CI environment, this lets devs disable it globally without touching the npm scripts.It also makes it less confusing on why watching isn't properly being disabled.
Similar or dependent issue(s):
Additional Data
The text was updated successfully, but these errors were encountered: