Skip to content

[use-http module] Cannot read property '__moduleExports' of undefined #385

@ashubham

Description

@ashubham

Describe the bug

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

image

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions