Mark dependencies as external and revert to outputting CJS only#418
Merged
NullVoxPopuli merged 5 commits intomainfrom Dec 11, 2025
Merged
Mark dependencies as external and revert to outputting CJS only#418NullVoxPopuli merged 5 commits intomainfrom
NullVoxPopuli merged 5 commits intomainfrom
Conversation
NullVoxPopuli
approved these changes
Dec 11, 2025
Member
|
Some context |
Member
Author
|
Yeah I'm a fan of bundling in general, but I think the prettier plugins were bundled by mistake rather than intentionally. |
NullVoxPopuli
approved these changes
Dec 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bundling the prettier plugins meant we were building this plugin with versions of those prettier plugins from the latest prettier. People supplying older prettier's as a peer dep could then run into problems when those plugin implementations diverged.
Bundling all of @babel/core seems like a mistake to me.
Before marking these as external
after
The prettier parsing plugins are CJS in certain versions, building this as esm and cjs doesn't help as prettier uses import() to load plugins, so our esm version is always loaded and then we try to import the cjs plugins through named exports, which does not work.
Fixes #417