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

fix(commonjs_scanner): ignore unresolve require span #3591

Merged
merged 6 commits into from
Jun 27, 2023

Conversation

suxin2017
Copy link
Collaborator

@suxin2017 suxin2017 commented Jun 20, 2023

fixed #3558

Summary

Given a test case like this:

// js
const require  = createRequire(...);
require(...) // 1
require.resolve(...); // 2

Rspack expects require and require.resolve should not be replaced by __webpack_require__ as the require variable is not the one provided by runtime. In previous PR, require will be kept, however require in member expression like require.resolve is replaced by mistake. This PR fixes this issue.

Test Plan

See test cases.

@h-a-n-a h-a-n-a self-assigned this Jun 20, 2023
@h-a-n-a
Copy link
Collaborator

h-a-n-a commented Jun 20, 2023

There is a typo in the directory name issuse-3558, which is intended to be issue-3358

@h-a-n-a h-a-n-a enabled auto-merge June 27, 2023 04:27
@h-a-n-a h-a-n-a added this pull request to the merge queue Jun 27, 2023
Merged via the queue into web-infra-dev:main with commit 4e7a65f Jun 27, 2023
17 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.

Bundle jsonpath library
3 participants