Created
May 26, 2020 09:34
-
-
Save arqex/79c62e533b73d1303dd7136657a13c59 to your computer and use it in GitHub Desktop.
webpack serverless
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
const slsw = require('serverless-webpack'); | |
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; | |
const analyzer = new BundleAnalyzerPlugin({ | |
analyzerMode: 'static', | |
openAnalyzer: false, | |
generateStatsFile: true | |
}); | |
module.exports = { | |
mode: 'development', | |
entry: slsw.lib.entries, | |
target: 'node', | |
externals: { | |
'aws-sdk': 'aws-sdk', | |
'google-libphonenumber': 'google-libphonenumber', | |
'pg-hstore': 'pg-hstore', | |
'sharp': 'commonjs sharp' | |
}, | |
plugins: [ | |
// analyzer | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment