Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Skip webpack on a per function basis #255
This is a Feature Proposal
I think it would be useful to be able to skip this plugin on a perfunction basis.
functions: pthon_func: runtime: python2.7 webpack: false
referenced a pull request that will
Oct 19, 2017
MS recently started with Java support for Azure. So it seems that more and more providers support other languages than JS.
So the least instrusive approach to add the feature would be just to check if
Imo this should be sufficient for a first approach. As soon as there is any more in common (like the runtime property) for other providers, we can think of supporting them too.
@johnf What do you think? Can you try to change the PR to this minimal approach, and use the condition NOT in the index, but in the compile/deploy steps where the entries array is reverse-mapped to functions again. Additionally you should rebase to the cuirrent master as there is the extensisbility PR already merges that changes the internal lifecycles to be extensible for plugin authors who want to plug into the serverloess-webpack plugin.
Just found this issue and wanted to share my current use case as it is slightly different. I would love to user webpack only on a subset of functions. I currently porting some legacy functions into the serverless repo where all other functions don't need webpack. I would like to avoid to bundle those as well.
Hi @Stereobit . You should use webpack (and sls-webpack), regardless, if your functions need to be transpiled. the reason for that is, that the plugin does packaging much better than serverless, i.e. it only packages dependencies that are really needed.
If you use the standard serverless packaging it will bundle ALL modules you have installed which bloats the packages.