-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
How to load type definitions automatically in a monaco worker? #80
Comments
We are changing the API design, Automatic type acquisition is achieved through For custom
I'm currently refactoring the relevant architecture, so we can keep this issue open. |
Hi @johnsoncodehk, |
By the way, about this comment:
At the moment, can this be used to have the files provided automatically without writing imports to the packages? |
I find that automatic type acquisition only supports for package with |
Hi @johnsoncodehk, I decided to give it a try. I have updated I tried to use the Any tip? Thanks in advance. |
When third-party modules is self-hosted, fetch assets from CDN is disallowed, so can we make customized fetching dts logic, or support |
API refactor is finish in 2.0, now you should use |
Thanks @johnsoncodehk, |
Hi,
I am using
@volar/monaco/worker
to create a language service formonaco-editor
.With the default
monaco-editor
TypeScript worker I can use addExtraLib to add an extra type definition so I can define some globals types that do not require to be imported (check the next screenshot using a React code)During the creation of the language service, I wanted to use my own
dtsHost
here:But I noticed that the types are fetched once the package is required in the code, it is not fetched by default. Debugging, I also noticed that
typescript
,vue
,csstype
and other modules are loaded automatically. Is there a way to achieve the same with my custom library and custom type definitions?Regards and thanks in advance.
The text was updated successfully, but these errors were encountered: