Serverless plugin to bundle your lambdas with Webpack
There is now a noInstall
options in packagerOptions
(for both NPM & Yarn) to skip deps installation during the Serverless package / deployment. If you enable that option, be sure packages are installed before.
custom:
webpack:
packagerOptions:
noInstall: true
The --no-build
CLI argument has been removed.
You should now define it inside your Serverless configuration:
custom:
webpack:
noBuild: true
The --watch
CLI argument has been improved and now works properly.
Full Changelog: https://github.com/serverless-heaven/serverless-webpack/compare/v5.5.5...v5.6.0
Full Changelog: https://github.com/serverless-heaven/serverless-webpack/compare/v5.5.4...v5.5.5
This release include one fix (#953) when using serverless-webpack
with webpack >= 5.52.0
This release include one fix (#944 thanks @mostthingsweb) when using sls deploy function --function=function-name
for a function defined without an explicit runtime
(that bug were introduced in 5.5.2).
Here is a small release with few fixes with one important improvement in memory usage when packaging function individually.
Thanks to contributors! 🤝
slsw.lib.options
(#857 @coyoteecd)New features were added in that release 🎉
Again, thanks to contributors! 🤝
node_modules
relative dirIn #689, thanks to @ypxing
This'll help people using monorepo. You define this option like that:
# serverless.yml
custom:
webpack:
includeModules:
nodeModulesRelativeDir: '../../' # relative path to current working directory.
spawn E2BIG
error when zippingIn #813, thanks to @j0k3r
While fixing a bug when using the excludeRegex
option a new one appear when we give a huge files list to the zip
command. It crashed with the E2BIG error.
Now, if you define the excludeRegex
option, we'll never use the zip
command but the NodeJS way to create the zip to avoid that error. It'll be slower but it'll work.
--no-build
option to serverless offline start
In #770, #649 & #501, thanks to @nponeccop, @francisu & @todda00
Extends the --no-build
option to serverless offline start
and serverless offline
, allowing the ability to use previously compiled files from either a previous serverless offline start
(when keeping output files) or from a direct serverless webpack
In #723, thanks to @rogersgt
It adds support for Docker Images as Custom Runtimes. Check the doc about that: https://github.com/serverless-heaven/serverless-webpack#support-for-docker-images-as-custom-runtimes
In #550, thanks @cfroese
It adds the ability to specify the network-concurrency option when using Yarn as the packager.
# serverless.yml
custom:
webpack:
packager: 'yarn'
packagerOptions:
networkConcurrency: 1
Finally, some annoying bugs introduced in 5.4.0 are now fixed. Thanks to contributors! 🤝
excludeRegex
option and allow dotfiles to be packaged (#780 @l1b3r)deploy -f
(#794 @pgrzesik)The next release will be the 5.5.0 with some additional features ✨
Here is a small release with few fixes. Thanks to contributors! 🤝 There are still some bugs reported since 5.4.0 was released that we need to work on.
keepOutputDirectory
in cleanup (#748 @daryl-c)After a long silence, here the latest release :v: We have new options, new arguments and some optimizations 🚀
📚 The full changelog is available here. But here are some highlights:
noFrozenLockfile
(boolean) under the packagerOptions
for the Yarn packager allows you to not have an up to date yarn.lock
. See #687excludeRegex
(string) allows you to filter files that match the regex before adding to the zip. See #612serializedCompile
(boolean) allows you to run each webpack buid one at a time to reduce memory usage. See #517allowCustomRuntime
(boolean) added to the function level in your serverless.yml
allows you force the packaging when you are using a nodejs custom runtime ONLY. See #675concurrency
(integer) allow to set the concurrency (defaults to the number of available cores), only works when packing functions individually. See #681--no-build
used when deploying won't re-build everything if you already build it (using sls webpack
for example). See #560bestzip
instead of archiver
to use natine zip command if it exists. See #596.webpack
folder. See #462