Skip to content

Commit 3562931

Browse files
committed
serverless-heaven#315 - Add watch-compile event for more fine grain event control while doing local development
1 parent 12a970a commit 3562931

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

index.js

+6
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ class ServerlessWebpack {
7272
'compile',
7373
],
7474
},
75+
"watch-compile": {
76+
type: 'entrypoint',
77+
lifecycleEvents: [
78+
'watch-compile',
79+
],
80+
},
7581
package: {
7682
type: 'entrypoint',
7783
lifecycleEvents: [

lib/wpwatch.js

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ module.exports = {
5151
if (firstRun) {
5252
firstRun = false;
5353
callback();
54+
}else{
55+
this.serverless.pluginManager.spawn('webpack:watch-compile')
5456
}
5557
});
5658
};

0 commit comments

Comments
 (0)