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

[Bug Report]: v2 An error is reported when the runtime plugin introduces a package like shiki or dynamically imports it #1865

Open
ErKeLost opened this issue Oct 23, 2024 · 0 comments
Assignees
Labels
bug Something isn't working v2.0 v2.0 version

Comments

@ErKeLost
Copy link
Member

Steps to reproduce

  1. runtime/plugin-hmr
 async highlightCode(code: string, language = 'javascript') {
    const hljs = await import("hightlight.js")
    if (language) {
      return hljs.highlight(code, { language }).value;
    }
    return hljs.highlightAuto(code).value;
  }

Reproduce link

No response

What is actually happening?

normal

get error

[ building ]  load cached module(17) ../../packages/runtime-plugin-hmr/src/index.ts.farm-runtime                                                                                                             [1]    18489 bus error  npm run dev --open

System Info

mac
@ErKeLost ErKeLost added the bug Something isn't working label Oct 23, 2024
@ErKeLost ErKeLost added the v2.0 v2.0 version label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v2.0 v2.0 version
Projects
None yet
Development

No branches or pull requests

2 participants