MCPcopy
hub / github.com/serverless/serverless / watch

Method watch

packages/serverless/lib/plugins/aws/dev/index.js:1119–1135  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1117 }
1118
1119 async watch() {
1120 const configFilePath = path.resolve(
1121 this.serverless.serviceDir,
1122 this.serverless.configurationFilename,
1123 )
1124
1125 chokidar
1126 .watch(configFilePath, {
1127 usePolling: true,
1128 })
1129 .on('change', (event, path) => {
1130 logger.warning(
1131 `If you've made infrastructure changes, restart the dev command w/ "serverless dev"`,
1132 )
1133 logger.blankLine()
1134 })
1135 }
1136
1137 validateOnExitOption() {
1138 const onExitOption = this.options['on-exit']

Callers 3

devMethod · 0.95
#startWatcherMethod · 0.80
#watchAndRebuildMethod · 0.80

Calls 3

resolveMethod · 0.80
warningMethod · 0.80
blankLineMethod · 0.80

Tested by

no test coverage detected