refactor: align starts_with
with the same semantics
#2872
Merged
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.
Related issue (if exists)
Summary
starts_with
should match itself.import.meta
, which uses strict to loose order to do matching after this PR.🤖 Generated by Copilot at 93b2022
This pull request improves the handling of
import.meta
expressions in the JavaScript plugin for rspack. It refactors the scanning code, adds support fortypeof import.meta
, and fixes a possible conflict withimport.meta.webpackHot
. It also moves some functions to a more appropriate module.Walkthrough
🤖 Generated by Copilot at 93b2022
typeof import.meta
andtypeof import.meta.xxx
expressions before other cases ofimport.meta
andimport.meta.xxx
inImportMetaScanner
visitor to avoid conflicts and simplify code (link, link, link)import.meta
itself as a valid case foris_member_expr_starts_with_import_meta
function and move it toimport_meta_scanner.rs
module to reduce imports and simplify logic (link)