-
-
Notifications
You must be signed in to change notification settings - Fork 151
feat(exclude): pattern matching for exclude #167
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(exclude): pattern matching for exclude #167
Conversation
src/index.ts
Outdated
| const config: Omit<BuildOptions, 'watch'> = { | ||
| ...this.buildOptions, | ||
| external: [...this.buildOptions.external, ...this.buildOptions.exclude], | ||
| external: [...this.buildOptions.external, ...removeWildCardStrings(this.buildOptions.exclude)], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the plugin passes the packages that are included in exclude currently, I tried not to disturb that behavior. But the wild card/patterns don't make any sense to pass, so removing them here, including only the plain strings.
|
@floydspace @olup Could you please review when you have some time? |
|
Hello @floydspace, @olup |
|
Hi @vamche , I couldn't yet, was Covid-19 positive. Will check the PR this week. Thanks |
|
@floydspace Sorry to hear that, hope you are doing OK now. I wish you a speedy recovery 🚀 |
|
Hi @vamche , I tested your changes and got a couple of remarks. First I want to clarify how the
what I expect from this PR: the goal is to implement an ability to But what I see now, it uses pattern to search libs in Thank you. |
7f986a5 to
a9345c9
Compare
|
@floydspace Thanks for the review, it helped me to understand the plugin more. I've updated the PR, as you suggested, I kept it simple to support only Usage: esbuild:
exclude: "*"or esbuild:
exclude:
- "*" |
|
@floydspace Could you please review? |
|
Hello @floydspace, hope everything is OK on your side. I just wanted to check if you got a chance to review the PR after the changes? |
a9345c9 to
8c33aa5
Compare
|
@floydspace Did you get a chance to look at the PR again? |
|
@floydspace could you please give this a look again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @vamche , sorry that ignored it for a long time, I approve it. I will merge it as a minor fix
| external: [...this.buildOptions.external, ...this.buildOptions.exclude], | ||
| external: [ | ||
| ...this.buildOptions.external, | ||
| ...(this.buildOptions.exclude === '*' || this.buildOptions.exclude.includes('*') ? [] : this.buildOptions.exclude) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here if exclude is * we must put all the dependencies as external otherwise they will be bundled which we do not need. in other words, if * it should behave like webpack-node-externals
|
🎉 This PR is included in version 1.18.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
hey there, I am not sure if this is working properly. I setup exclude as the following: check how is the size of my zip file when I run now I tried to remove all the things I have as dependencies on exclude: You can see that I needed to list even my dev dependencies here. After that, this is what I got: The goal wans't to list all of it?! The versions I am using is the following: Thanks in advance. |
|
ericmaicon Same here! wildcard doesn't work, I need to put all the libraries I'm using one by one |
|
I'll take a peek over the weekend 👀 |
|
@ericmaicon @AlisonVilela This implementation requires the node modules to be set as externals as well. Here is a sample configuration.
Please let me know if you have questions. thank you! |


No description provided.