We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
give me an example with esm 2022 modules
The text was updated successfully, but these errors were encountered:
Here's an example on how to import with esm modules.
import Twilio from "twilio"; const client = Twilio(accountSid, authToken);
Sorry, something went wrong.
Twilio doesn't give a shit. It's no longer a dev first platform.
Hi folks! Here is an example to use twilio with es module.
import twilio from 'twilio' const accountSid = 'xxx' const authToken = 'xxx' const client = twilio(accountSid, authToken) client.messages .create({ body: 'Hello from Twilio', from: '+1xxx', to: '+1xxx' }) .then(message => { console.log(message.sid) })
Make sure you have "type": "module" present in your package.json. Thanks!
"type": "module"
Closing this issue as no update was received in last 30 days
No branches or pull requests
Preflight Checklist
Problem Description
give me an example with esm 2022 modules
Proposed Solution
give me an example with esm 2022 modules
Alternatives Considered
give me an example with esm 2022 modules
Additional Information
give me an example with esm 2022 modules
The text was updated successfully, but these errors were encountered: