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 support for config file #323

Merged
merged 1 commit into from
Jun 27, 2022

Conversation

tinchoz49
Copy link
Contributor

Hey guys.

This PR adds support to specify a config file. So the user can have more control about the configuration.

For example: If I want to define all my dependencies as external I have to use a esbuild plugin or define in the serverless.yml the entire list of dependencies.

Using a config file lets the user to solve this by:

module.exports = () => ({
  external: Object.keys(require('./package.json').dependencies)
})

Without having to install new dependencies or esbuild plugins that can impact in the performance.

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.

@tinchoz49 it looks good, thanks for your contribution.
The extra point here: you could also use https://github.com/serverless/typescript to define serverless config as TS file and do the same thing with importing package.json dependencies. However, it still requires having 181-184 lines from your PR. so I give a green light. 👍

@tinchoz49
Copy link
Contributor Author

Thank you @floydspace !

@floydspace floydspace merged commit 2c1d2ac into floydspace:master Jun 27, 2022
@github-actions
Copy link

🎉 This PR is included in version 1.31.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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