dougmoscrop / serverless-plugin-include-dependencies

MIT License
184 stars 38 forks source link

Use caching to reduce redundant work #50

Closed rschick closed 3 years ago

rschick commented 4 years ago

This will speed things up when building combined packages. Without these changes the plugin recomputes dependencies for the same files/modules over and over so packaging times can get quite long if you have a lot of functions and/or use "include: always".

I'm also not sure when the logic in serverless changed, but this code goes through every file in the project (including things like .git/**) and compares the file list against the include/exclude list. It's a complete waste of time when using this plugin, so I added this in our serverless.yml to work around it:

package:
  include:
    - '!**'

I'm wondering if this plugin should add !** to the include list by default. Or I could at least add a note to the readme.

aychtang commented 3 years ago

@dougmoscrop my team would also be interested in this for our use case, would be great if this could be released soon as an opt-in flag

dougmoscrop commented 3 years ago

Okay, I will go over all my OSS stuff tomorrow and make sure I have merged/released, sorry!