serverless-heaven / serverless-webpack

Serverless plugin to bundle your lambdas with Webpack
MIT License
1.72k stars 417 forks source link

Need ability to disable specific functions by name #454

Open bradennapier opened 6 years ago

bradennapier commented 6 years ago

In the case of serverless-plugin-warmup it custom provides code that gets broken if packaged by webpack directly. I want it to ignore bundling this complete in that case otherwise they just are incompatible completely.

juanjoDiaz commented 6 years ago

In general, I think that it would be great to be able to select which functions are bundled and which ones are not. Either by name or adding a config.

gdugernier commented 5 years ago

255 and #256 are all about that and it would be indeed a must needed feature.

Meanwhile, for anyone looking for a solution for whatever reason (incompatible plugins, different runtimes...), a viable workaround is to use multiple stacks: one with everything that must be bundled and one without. Lerna will come to the rescue to easily manage multiple packages, especially if your deployment occurs inside CodeBuild. Instead of navigating the directory tree in and out of each package, you can just add lerna commands in the buildspec.yml and all packages will be tested and deployed one after the other.

It's not ideal since your project can quickly become a bit maze-like if you don't think things through properly, but it works and most of the time it's what matters. So until #256 got approved or another solution is suggested, that's how I structure my projects.

tdi commented 5 years ago

Is there any progress on this? Now basically the plugin prevents from using multiple runtimes in the same stack.