Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Jun 23, 2023

Fixes misalignment of debugger statements etc. when using this plugin, which forced us back to Webpack.


Barely tested due to:

We'll probably migrate to another package which has a proper JS parser (instead of hacky regex), so I'm not sure how much time I'll invest into improving this PR.

removeComments(ms, singleCommentsRegex);

const requireMatches = code.matchAll(requireRegex);
const requireMatches = ms.toString().matchAll(requireRegex);
Copy link
Author

Choose a reason for hiding this comment

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

These steps might not work correctly, because the modified string is being returned here, but replacements happen in the original string.

This should probably be improved, but I feel this code needs to be modified anyway (with a proper JS parser instead of regex).

@ghost ghost closed this by deleting the head repository Oct 28, 2024
This pull request was closed.
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.

0 participants