rahul
8 years ago
2 changed files with 29 additions and 0 deletions
@ -0,0 +1,23 @@ |
|||
'use strict'; |
|||
|
|||
const BbPromise = require('bluebird'); |
|||
const webpack = require('webpack'); |
|||
|
|||
module.exports = { |
|||
wpwatch() { |
|||
this.serverless.cli.log('Watching with Webpack...'); |
|||
|
|||
const compiler = webpack(this.webpackConfig); |
|||
compiler.watch({}, (err, stats) => { |
|||
if (err) { |
|||
throw err; |
|||
} |
|||
|
|||
if (stats) { |
|||
console.log("Webpack rebuilt"); |
|||
} |
|||
}); |
|||
|
|||
return BbPromise.resolve(); |
|||
}, |
|||
}; |
Loading…
Reference in new issue