Browse Source

Fix babel-polyfill related issue in babel example

master
Nicola Peduzzi 8 years ago
parent
commit
e07ab1dcfa
  1. 4
      examples/babel/handler.js
  2. 5
      examples/babel/webpack.config.js

4
examples/babel/handler.js

@ -1,3 +1,7 @@
if (!global._babelPolyfill) {
require('babel-polyfill');
}
export const hello = (event, context, cb) => { export const hello = (event, context, cb) => {
const p = new Promise((resolve, reject) => { const p = new Promise((resolve, reject) => {
resolve('success'); resolve('success');

5
examples/babel/webpack.config.js

@ -1,8 +1,5 @@
module.exports = { module.exports = {
entry: [ entry: './handler.js',
'babel-polyfill',
'./handler.js'
],
target: 'node', target: 'node',
module: { module: {
loaders: [{ loaders: [{

Loading…
Cancel
Save