Skip to content

Instantly share code, notes, and snippets.

@cardoni
Last active June 27, 2017 21:31
Show Gist options
  • Save cardoni/071bbaccb1d7822d02f5a9de6c4044d6 to your computer and use it in GitHub Desktop.
Save cardoni/071bbaccb1d7822d02f5a9de6c4044d6 to your computer and use it in GitHub Desktop.
Serverless Plugin Webpack: Config
module.exports = {
// `serverless-plugin-webpack` is handling the `entry` & `output` configs
// that would normally be found below in a `webpack.config.js` file
target: 'node',
externals: [
/aws-sdk/,
],
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: [
'es2017',
'es2016',
'es2015-node6',
],
plugins: [
'add-module-exports',
'transform-class-properties',
'transform-export-extensions',
'transform-object-rest-spread',
],
},
},
],
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment