Serverless Webpack Bundling Best Practices

I’ve just migrated from moment to date-fns, and expected my package to be reduced in size, but it got bigger! I eventually solved this by excluding date-fns (and aws-sdk) in my yaml file, and then adding date-fns into the allowlist in my webpack externals

webpack.config.js snippet
externals: [nodeExternals({ allowlist: [/^date-fns/] })],

serverless.yml snippet
custom: webpack: includeModules: forceExclude: - aws-sdk - date-fns

I’ve also tried setting my indcludeModules: false in my yml, but this causes issues with other packages.

I’ve also a few serverless plugins but they seem to cause issues with webpack.

Is there any easier way to better improve my deployment package sizes? My current solution is too manual.

Serverless Framework Core: 2.4.0