Skip to content

Async imports behave differently in production and dev #1168

@MartinMalinda

Description

@MartinMalinda

Describe the bug

const PhotoSwipe = await import('photoswipe'); // works in dev, fails in prod
const { default: PhotoSwipe } = await import('photoswipe'); // fails in dev, works in prod 

Previously before vite update I was using { default: PhotoSwipe } everywhere and that worked well

System Info

  • required vite version: 1.0.0-rc.13
  • required Operating System: MacOS
  • required Node version: 10.16

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