Last active
June 27, 2017 21:31
-
-
Save cardoni/071bbaccb1d7822d02f5a9de6c4044d6 to your computer and use it in GitHub Desktop.
Serverless Plugin Webpack: Config
This file contains hidden or 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
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