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

Desktop: Fixes #9752: CodeMirror 6 plugin API: Allow importing @codemirror/lang-markdown and @lezer/highlight #9753

Conversation

personalizedrefrigerator
Copy link
Collaborator

@personalizedrefrigerator personalizedrefrigerator commented Jan 19, 2024

Summary

Allows plugins to import @codemirror/lang-markdown and @lezer/highlight without also bundling additional copies of the libraries.

Testing

  1. Create a plugin that uses the updated webpack.config.js (I copied webpack.config.js into an existing plugin).
  2. Require both @codemirror/lang-markdown and @lezer/highlight
  3. Inspect the generated bundle to verify that neither library has been included
  4. Run the plugin and verify that both libraries were imported

@@ -21,12 +24,14 @@ const libraryNameToPackage: Record<string, any> = {
'@codemirror/language': codeMirrorLanguage,
'@codemirror/autocomplete': codeMirrorAutocomplete,
'@codemirror/commands': codeMirrorCommands,
'@codemirror/highlight': lezerHighlight,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@laurent22 laurent22 merged commit 6720fd1 into laurent22:dev Jan 22, 2024
10 checks passed
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