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]: "@monaco-editor/react" does not work with rsbuild: "Uncaught SyntaxError: expected expression, got ';'" #2843

Closed
Its-treason opened this issue Jul 8, 2024 · 1 comment
Labels
🐞 bug Something isn't working

Comments

@Its-treason
Copy link

Version

System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 AMD Ryzen 5 1600X Six-Core Processor
    Memory: 7.59 GB / 15.95 GB
  Browsers:
    Edge: Chromium (126.0.2592.87)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    @rsbuild/core: 1.0.0-alpha.5 => 1.0.0-alpha.5
    @rsbuild/plugin-react: 1.0.0-alpha.5 => 1.0.0-alpha.5

Details

When trying to use the @monaco-editor/react package the compiled JS has a syntax error:

image

This screenshot is from the Reproduce example linked below. I also tested it with Edge/Chrome with the same result.

The package works fine with other build tools like vite: https://stackblitz.com/edit/vitejs-vite-j7jeph?file=src%2FApp.tsx

Reproduce link

https://github.com/Its-treason/rsbuild-monaco-editor-error

Reproduce Steps

  • pnpm i (Or npm)
  • pnpm run dev
  • Browser will open with empty page and an error in the console
@Its-treason Its-treason added the 🐞 bug Something isn't working label Jul 8, 2024
@Its-treason
Copy link
Author

Sorry, i just saw this was fixed 3 hours ago with 1.0.0-alpha.6. pnpm create rsbuild@latest was still using alpha.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant