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

includeModules should be true by default #451

Closed
wants to merge 1 commit into from

Conversation

stevemao
Copy link
Contributor

@stevemao stevemao commented Sep 26, 2018

If a module is not bundled, it will automatically package it.
If all modules are bundled, it will package nothing extra. So this is more intuitive.

Is this ready for review?: YES
Is it a breaking change?: NOT for most users. I can't why if a module is not bunded, one doesn't want to package it.

If a module is not bundled, it will automatically package it.
If all modules are bundled, it will package nothing extra. So this is more intuitive.
@designfrontier designfrontier self-requested a review April 10, 2019 15:52
@designfrontier
Copy link
Contributor

@stevemao After some thought and discussion we are going to decline your PR. This is certainly not the most intuitive change, but it would require all of our users to check their config and ensure that no change was needed for their project.

We're not opposed to breaking changes, but this particular change would be difficult to communicate out and it is a subtle enough change that people would certainly end up broken because of it.

Is there documentation that we could add that would make the current state of the setting clearer in your mind?

Thank you for your willingness to help out!

@stevemao
Copy link
Contributor Author

stevemao commented May 8, 2019

I believe most people already use:

# serverless.yml
custom:
  webpack:
    includeModules:
      forceExclude:
        - aws-sdk

So this option should impact minimal users.

Also this change will potentially pack packages that users "forgot" to pack. So their code should automatically work and it's more like a bug fix than breaking change.

@stevemao
Copy link
Contributor Author

stevemao commented May 8, 2019

Looking at it again, once you do:

# serverless.yml
custom:
  webpack:
    includeModules:
      forceExclude:
        - aws-sdk

if includeModules is false by default, the above code should do nothing since it's already not packing any deps. But if it's true then I'm consciously force exclude my aws-sdk.

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

Successfully merging this pull request may close these issues.

2 participants