Skip to content
New issue

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

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

Already on GitHub? # to your account

Support forceExclude to exclude dependencies #248

Merged
merged 3 commits into from
Oct 19, 2017
Merged

Conversation

HyperBrain
Copy link
Member

@HyperBrain HyperBrain commented Oct 4, 2017

What did you implement:

Closes #247

How did you implement it:

The configuration now allows for a forceExclude array besides the forceInclude array. All modules specified will be forcefully excluded, even if they appear as production dependencies. If the excluded dependency includes a peer dependency, this has to be excluded manually because the peer is still required, even if the excluded dependency is drawn from somewhere else.

Sample:

#serverless.yml
custom:
  webpackIncludeModules:
    forceInclude:
      - module1
    forceExclude:
      - module2

The precedence is exclude -> include, i.e. if a module appears in include as well as in exclude, it will be excluded (exclude wins).

How can we verify it:

Just use a configuration as in the sample above, do a serverless package and check the zip files created in .serverless.

Todos:

  • Write tests
  • Write documentation
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config / commands / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

@HyperBrain HyperBrain merged commit c2a368b into master Oct 19, 2017
@HyperBrain HyperBrain deleted the force-exclude branch October 19, 2017 09:03
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ForceExclude
1 participant