- Notifications
You must be signed in to change notification settings - Fork549
Remove express dependency to reduce package size#1119
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@tiwarishubham635 👋 This repository doesn't haveCopilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Clickhere to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
Co-authored-by: tiwarishubham635 <59199353+tiwarishubham635@users.noreply.github.com>
Co-authored-by: tiwarishubham635 <59199353+tiwarishubham635@users.noreply.github.com>
Uh oh!
There was an error while loading.Please reload this page.
This PR addresses the package size concern by removing the unnecessary express dependency from devDependencies.
Problem
The issue reported that the package size was large due to express being included. Upon investigation, I found that:
examples/express.js
)devDependencies
, not production dependenciesSolution
advanced-examples/express-webhook-example.md
with:Impact
Backward Compatibility
All webhook functionality remains fully intact:
twilio.webhook()
- Express middleware function still workstwilio.validateExpressRequest()
- Express request validation preservedtwilio.validateRequest()
- Generic validation unchangedThe webhook implementation in
src/webhooks/webhooks.ts
provides Express-compatible middleware without requiring Express as a dependency, which is the correct architectural approach.Testing
Fixes#1118.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn moreCopilot coding agent tips in the docs.