Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add skipEsbuild option on a per function level #423

Merged
merged 1 commit into from
Jan 6, 2023

Conversation

koryhutchison
Copy link
Contributor

Use case:

I've got multiple projects where I'm using serverless-esbuild and it's working great. But I'm building my own custom plugin for these projects where I'm adding a function and defining my own artifact zip file. Turns out though, serverless-esbuild will try to run esbuild even if an artifact is already defined. I'm sure this use case wasn't something that was thought of in the beginning, but I feel like it's something this should account for.

This has also been brought up in #376

Solution:

I tried going a variety of different routes, but the best solution I have so far is to make it so you can set a property when you define the function called skipEsbuild and if it's true, then it'll just skip over it. I'm leveraging the Serverless schema configuration helpers so that some default validation takes place.

I'm still pretty new to TypeScript and all, so if I did something incorrect here, let me know!

Copy link
Owner

@floydspace floydspace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @koryhutchison thanks, look good to me. I think it will cover a lot of cases. People were asking for this

@floydspace floydspace merged commit ec4aab9 into floydspace:master Jan 6, 2023
@github-actions
Copy link

github-actions bot commented Jan 6, 2023

🎉 This PR is included in version 1.36.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@floydspace
Copy link
Owner

@all-contributors please add @koryhutchison for new code and idea

@allcontributors
Copy link
Contributor

@floydspace

I've put up a pull request to add @koryhutchison! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants