You've already forked serverless-webpack
mirror of
https://github.com/encounter/serverless-webpack.git
synced 2026-03-30 11:37:58 -07:00
22a460d8b1
* Deploy package function * Listen pipe and reject pipe errors * using once instead of on * Fix babel example * - Adding babel-multiple-statically-entries example - Renaming multiple-entries-example to multiple-statically-entries * Exposing entries to lib * Adding babel-dynamically-entries examples * - Updating examples dependencies - Adding yarn to examples - Fix typescript example * Adding tests * Removed yarn lock file. yarn should use package-lock.json * Allow handlers in arbitrary paths. Use lodash and SLS functions. * Adapted unit tests * Mention new entry resolution in README * Bundle names now contain the js ending. Fixed output in examples.
16 lines
334 B
JavaScript
16 lines
334 B
JavaScript
if (!global._babelPolyfill) {
|
|
require('babel-polyfill');
|
|
}
|
|
|
|
export const hello = (event, context, cb) => {
|
|
const p = new Promise((resolve, reject) => {
|
|
resolve('success');
|
|
});
|
|
p
|
|
.then(r => cb(null, {
|
|
message: 'Go Serverless Webpack (Babel) v1.0! Second module!',
|
|
event,
|
|
}))
|
|
.catch(e => cb(e));
|
|
};
|