Skip to content
This repository was archived by the owner on Jul 9, 2019. It is now read-only.

Commit 839d2e5

Browse files
committed
Fixed watcher restarts after each recompilation.
1 parent ffc70bc commit 839d2e5

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
[![Coverage Status][ico-coverage]][link-coverage]
88
[![Contributors][ico-contributors]][link-contributors]
99

10+
11+
# FORK'S PURPOSE
12+
13+
Fixed webpack's watcher restarts after each recompilation.
14+
15+
For more info see https://github.com/serverless-heaven/serverless-webpack/issues/465.
16+
17+
18+
<hr>
1019
A Serverless v1.x plugin to build your lambda functions with [Webpack][link-webpack].
1120

1221
This plugin is for you if you want to use the latest Javascript version with [Babel][link-babel];

lib/wpwatch.js

+1-11
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,7 @@ module.exports = {
6666
this.serverless.cli.log('Watching for changes...');
6767
callback();
6868
} else {
69-
// We will close the watcher while the compile event is triggered and resume afterwards to prevent race conditions.
70-
watcher.close(() => {
71-
return this.serverless.pluginManager.spawn('webpack:compile:watch')
72-
.then(() => {
73-
// Resume watching after we triggered the compile:watch event
74-
return BbPromise.fromCallback(cb => {
75-
startWatch(cb);
76-
})
77-
.then(() => this.serverless.cli.log('Watching for changes...'));
78-
});
79-
});
69+
this.serverless.cli.log('Watching for changes...');
8070
}
8171
});
8272
};

0 commit comments

Comments
 (0)