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

Support Regexp externals #654

Merged
merged 9 commits into from Mar 21, 2021
Merged

Support Regexp externals #654

merged 9 commits into from Mar 21, 2021

Conversation

huozhi
Copy link
Member

@huozhi huozhi commented Feb 22, 2021

Resolves #647

Changes

Support regex pattern for externals, to exclude more external libs easily.
Regexp is supported natively, this can avoid adding extra libraries to support wildcard patterns like pattern*.

Usage

 {
   externals: {
     'externaltest': 'externalmapped',
     '/\\w+-regex/': 'regexexternal',
   }
}

Copy link
Contributor

@guybedford guybedford left a comment

Choose a reason for hiding this comment

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

This looks great to me, sorry for the delayed review on this @huozhi.

The implementation seems sensbile. See the comment re the matching form.

test/index.test.js Outdated Show resolved Hide resolved
Copy link
Contributor

@guybedford guybedford left a comment

Choose a reason for hiding this comment

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

Rebased, and changed the ordering in the object form.

Thanks again @huozhi for your work here.

@huozhi
Copy link
Member Author

huozhi commented Mar 21, 2021

Thank you for the great advice and quick improvements! @guybedford

@styfle styfle added the automerge Automatically merge PR once checks pass label Mar 21, 2021
Copy link
Member

@styfle styfle left a comment

Choose a reason for hiding this comment

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

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Automatically merge PR once checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for wildcard externals
3 participants