Describe the bug
When using the use-http package, the vite optimizer produces a module which fails during runtime with the following error:

FWIW, I have already been using Rollup in my project and the use-http package was being built successfully to a bundle.
Reproduction
I used create-vite-app to create a React app and just added the module to repro the issue:
https://github.com/ashubham/vite-bug-1
System Info
- required
vite version: 0.20.7
- required Operating System: OSX
- required Node version: 12.11.0