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

Remove SWC fold from globals replacer #9830

Merged
merged 2 commits into from
Jul 3, 2024
Merged

Conversation

yamadapc
Copy link
Contributor

@yamadapc yamadapc commented Jul 2, 2024

Continuing with #9828 and #9829

@@ -22,171 +22,225 @@ use crate::utils::is_unresolved;
use crate::utils::SourceLocation;
use crate::utils::SourceType;

/// Replaces a few node.js constants with literals or require statements.
/// This duplicates some logic in [`NodeReplacer`]
Copy link
Contributor

Choose a reason for hiding this comment

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

Honestly, all of these "globals" are node specific. Could just move it all there, if you're keen for a refactor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems there's overlap though; e.g.: there're two implementations of the same thing on these two files.

@yamadapc yamadapc merged commit 31cff68 into v2 Jul 3, 2024
17 checks passed
@yamadapc yamadapc deleted the no-swc-fold-on-globals-replacer branch July 3, 2024 23:57
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.

3 participants