Skip to content

Instantly share code, notes, and snippets.

@chris-olszewski
Created August 2, 2016 21:24
Show Gist options
  • Save chris-olszewski/8dbbfd014161105878d9374cdc4c5fdc to your computer and use it in GitHub Desktop.
Save chris-olszewski/8dbbfd014161105878d9374cdc4c5fdc to your computer and use it in GitHub Desktop.
Serverless v1 Webpack
var webpack = require('webpack');
module.exports = {
context: __dirname,
entry: './index',
output: {
path: __dirname,
filename: 'handler.js',
libraryTarget: 'commonjs2'
},
target: 'node',
externals: [require('webpack-node-externals')()],
resolve: {
extensions: ['.js']
},
plugins: [
],
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015']
}
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment