Skip to content

Instantly share code, notes, and snippets.

@arqex
Created May 26, 2020 09:34
Show Gist options
  • Save arqex/79c62e533b73d1303dd7136657a13c59 to your computer and use it in GitHub Desktop.
Save arqex/79c62e533b73d1303dd7136657a13c59 to your computer and use it in GitHub Desktop.
webpack serverless
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