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

fix: allow Node modules to be excluded from the bundle #673

Merged
merged 4 commits into from Oct 6, 2021

Conversation

eduardoboucas
Copy link
Member

- Summary

It's possible to use the included_files configuration property to exclude files from the bundle, by prefixing globs with a !. However, this exclusion does not affect paths coming from Node modules required by functions.

This PR changes that, making it possible to force a set of files to be excluded from the bundle.

Closes #669

- Test plan

Added a test.

- A picture of a cute animal (not mandatory but encouraged)

Light-Seal-and-Bush jpg 900x600_q85_crop

@eduardoboucas eduardoboucas added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Sep 24, 2021
@github-actions github-actions bot added the type: bug code to address defects in shipped code label Sep 24, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Sep 24, 2021

⏱ Benchmark results

Comparing with 1e3ac5a

largeDepsEsbuild: 13.2s

⬆️ 12.26% increase vs. 1e3ac5a

^                                                  13.2s  
│          12.5s   12.8s                   12.6s    ┌──┐  
│  11.6s    ┌──┐    ┌──┐   11.7s            ┌──┐    |▒▒|  
│ ──┌──┐────┼──┼────┼──┼────┌──┐───11.1s────┼──┼────|▒▒|──
│   |  |    |  |    |  |    |  |    ┌──┐    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
└───┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴──>
    T-6     T-5     T-4     T-3     T-2     T-1      T    
Legend

largeDepsZisi: 1m 9.1s

⬆️ 16.41% increase vs. 1e3ac5a

^                 1m 7.5s                 1m 7.7s 1m 9.1s 
│         1m 4.9s   ┌──┐                    ┌──┐    ┌──┐  
│           ┌──┐    |  |                    |  |    |▒▒|  
│ ─57.8s────┼──┼────┼──┼───59.5s────59s─────┼──┼────|▒▒|──
│   ┌──┐    |  |    |  |    ┌──┐    ┌──┐    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
└───┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴──>
    T-6     T-5     T-4     T-3     T-2     T-1      T    
Legend

@eduardoboucas eduardoboucas merged commit 5078244 into main Oct 6, 2021
@eduardoboucas eduardoboucas deleted the feat/exclude-modules branch October 6, 2021 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow included_files to exclude node modules
2 participants