webcontainer-core icon indicating copy to clipboard operation
webcontainer-core copied to clipboard

types are broken in editor with `type: module`

Open Mister-Hope opened this issue 8 months ago • 2 comments

Describe the bug

Install vuepress with pnpm

Link to the blitz that caused the error

https://stackblitz.com/edit/vuepress-theme-hope?file=package.json,docs%2F.vuepress%2Fconfig.ts

Steps to reproduce

See the editor:

image

Expected behavior

Working, everything is fine in a local editor.

image

Parity with Local

Screenshots

image

The vuepress package is a esm package, while the special thing is that it exports other esm package types directly:

And the defineUserConfig is something that @vuepress/cli exports.

Moreover, when I change the exports to vuepress/cli (which is a sub export that re-export @vuepress/cli),

image

image

Platform

  • OS: [e.g. macOS, Windows, Linux]: Windows
  • Browser: [e.g. Chrome, Safari, Firefox]: Chrome
  • Version: [e.g. 91.1]: 125.0

Additional context

No response

Mister-Hope avatar May 28 '24 05:05 Mister-Hope