Created
August 2, 2016 21:24
-
-
Save chris-olszewski/8dbbfd014161105878d9374cdc4c5fdc to your computer and use it in GitHub Desktop.
Serverless v1 Webpack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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