Skip to content

[Bug]: (await import("compromise")).default crashes when using strictExecutionOrder #5055

@skovhus

Description

@skovhus

Reproduction link or steps

https://stackblitz.com/edit/github-z3jerszh?file=vite.config.ts (pnpm build + pnpm preview)

What is expected?

Production build shouldn't crash and work like the development build.

What is actually happening?

It crashes due to some import issue.

System Info

n/a

Any additional comments?

// Input: 
const library = (await import("compromise")).default;

// Output:
const library = (
  await __vitePreload(
    async () => {
      const { __vite_default__ } = await import("./three.CfgmKlHw.js");
      return { __vite_default__ };
    },
    __vite__mapDeps([0, 1, 2]),
    import.meta.url
  )
).default;


// Input (workaround):

const importedLibrary = await import("compromise");
const library = importedLibrary.default;

// Output:

const importedLibrary = await import("./three.C2fRUMY_.js");
const library = importedLibrary.default;

Metadata

Metadata

Assignees

Type

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions