-
Notifications
You must be signed in to change notification settings - Fork 1k
Exclude certain file extensions from being bundled in python_modules. #10803
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
Conversation
|
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
!m.name.endsWith(".css") && | ||
!m.name.endsWith(".gz") && | ||
!m.name.endsWith(".txt") && | ||
!m.name.endsWith(".js") |
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.
Excluding .js
files is going to break urllib3 again. It also seems to me that it is impossible to override these filters from wrangler.jsonc file? What if someone explicitly wants to include one of these file types?
!m.name.endsWith(".png") && | ||
!m.name.endsWith(".jpg") && | ||
!m.name.endsWith(".css") && | ||
!m.name.endsWith(".gz") && |
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.
any way to customize these? because django needs to load this specific .gz common-passwords.txt.gz
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.
oh, I included it because it was in your screenshot
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.
my bad sorry
Closing in favour of #10927 |
Certain packages, like django, install a lot of additional files into python_modules which shouldn't be bundled in the worker. Some of these files are so large in aggregate that they balloon up the size of the bundle past limits.
This PR adds certain file extensions that we shouldn't be including. We can expand this list later in the future as we find other file types that shouldn't be included.
Test Plan