Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal crash on export * as #1439

Closed
jods4 opened this issue Jan 8, 2021 · 0 comments
Closed

Internal crash on export * as #1439

jods4 opened this issue Jan 8, 2021 · 0 comments

Comments

@jods4
Copy link
Contributor

jods4 commented Jan 8, 2021

Describe the bug

I tried the following code, prismjs is a CJS module available on NPM.

export * as Prism from "prismjs"

That line crashes Vite:

Plugin: vite:imports
  File: /App/prism.ts
  TypeError: Cannot read property 'forEach' of undefined
      at transformCjsImport (C:\Project\node_modules\vite\dist\node\chunks\dep-85227760.js:53329:20)
      at TransformContext.transform (C:\Project\node_modules\vite\dist\node\chunks\dep-85227760.js:53224:67)
      at processTicksAndRejections (node:internal/process/task_queues:93:5)
      at async Object.transform (C:\Project\node_modules\vite\dist\node\chunks\dep-85227760.js:59967:30)
      at async transformRequest (C:\Project\node_modules\vite\dist\node\chunks\dep-85227760.js:66205:29)
      at async C:\Project\node_modules\vite\dist\node\chunks\dep-85227760.js:66292:32

System Info

  • vite version: 2.0.0-beta.12
  • Operating System: Win 10
  • Node version: 15
  • Package manager (npm/yarn/pnpm) and version: npm 7
@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant