Skip to content

Monaco volar language worker not working in Nuxt #26164

@dojo-vue

Description

@dojo-vue

Environment

https://codesandbox.io/p/devbox/floral-shape-g3jqfk?workspaceId=e5b65ea6-731c-41c7-b94a-05025ff341b6

Reproduction

https://codesandbox.io/p/devbox/floral-shape-g3jqfk?workspaceId=e5b65ea6-731c-41c7-b94a-05025ff341b6

Describe the bug

The monaco volar package is not working correctly in Nuxt.
The same implementation works fine in a Vite + Vue setup, but in a Nuxt environment the monaco hover content is not displayed correctly.

There are no errors so it's a bit hard to debug. Setting up custom hover content works so I assume there is a problem with the Worker or Vite configuration, something related to Nuxt.

Nuxt environment(not working)
https://codesandbox.io/p/devbox/floral-shape-g3jqfk

Vue+Vite environment(working)
https://codesandbox.io/p/devbox/nifty-drake-pkr7jz

What is expected to work:
2024-03-09 14_29_06-Window

But does not work in Nuxt:
2024-03-09 14_35_50-Clipboard

Additional context

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions