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

No cjs fragments to export #388

Closed
char0n opened this issue Jun 21, 2022 · 6 comments
Closed

No cjs fragments to export #388

char0n opened this issue Jun 21, 2022 · 6 comments

Comments

@char0n
Copy link
Contributor

char0n commented Jun 21, 2022

Some packages like client exports cjs fragments. cjs fragments are not part of npm distribution anymore. Exports needs to go away. Working on PR.

image

char0n added a commit to char0n/monaco-languageclient that referenced this issue Jun 21, 2022
@kaisalmen
Copy link
Collaborator

Hi @char0n sorry, my mistake. The files are still there, but not packaged. I will provide a 2.0.1 soon.

@kaisalmen
Copy link
Collaborator

New release is available:
https://www.npmjs.com/package/monaco-languageclient/v/2.0.1

@kaisalmen
Copy link
Collaborator

@char0n Thank you

@CGNonofr
Copy link
Collaborator

@kaisalmen it seems that @CodinGame/monaco-vscode-api can only work in esm mode, since it imports code from monaco-editor which is in esm to prevent bundling too many things vrom vscode. The library still exports an amd and cjs versions but they still import esm from monaco-editor, I don't think it makes much sense.

The amd version of monaco editor is tweaked and use a loader which prevent access to some internal tools that monaco-vscode-api requires (I don't exactly know how it's built but the files are different)

I plan to keep only the esm output of the lib (is there any other solution?) which makes any other output type of monaco-languageclient pointless

@kaisalmen
Copy link
Collaborator

kaisalmen commented Jun 22, 2022

I plan to keep only the esm output of the lib (is there any other solution?) which makes any other output type of monaco-languageclient pointless

Yes, the bundling choice/transformation beyond ESM should be made at the application bundling step and not at monaco-vscode-api.
We can keep the CJS for monaco-converters and I will should have ESM and CJS for vscode-ws-jsonrpc (new issue #390 ).

@kaisalmen
Copy link
Collaborator

@char0n this is resolved and we kept the cjs exports for the monaco-converters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants