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

import esm module from parseTree #23

Merged
merged 3 commits into from
Mar 11, 2024
Merged

import esm module from parseTree #23

merged 3 commits into from
Mar 11, 2024

Conversation

DarhkVoyd
Copy link
Contributor

This PR aims to resolve the issue of using a temporary hack to run the language server as we are unable to use the bundled output due to a MODULE NOT FOUND error.

Description:
The jsonc-parser dependency has two module implementations in its library, ESM and UMD. Now, VSCode requires us to bundle the code into a single CommonJS module but the thing is esbuild doesn't have a built-in feature for direct UMD to CJS conversion but it does have ESM to CJS. Currently, the import uses the default export of the library which seems to be the UMD module, the solution is to simply change the import to the ESM module instead.

Copy link
Collaborator

@jdesrosiers jdesrosiers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for figuring this out!

@jdesrosiers jdesrosiers merged commit be36496 into hyperjump-io:main Mar 11, 2024
2 checks passed
jdesrosiers added a commit that referenced this pull request Mar 12, 2024
Although this works for the vscode build, it doesn't work when running
the server normally as is being done with Neovim.
@jdesrosiers
Copy link
Collaborator

Unfortunately, I had to revert this. Although this fixes the vscode setup, it breaks the neovim setup. We need a solution that works for both.

@jdesrosiers
Copy link
Collaborator

I managed to stumble on the right solution.

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

Successfully merging this pull request may close these issues.

2 participants