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

CJS nextLoader callback in loader hook doesn't use changed URL #56376

Open
awto opened this issue Dec 27, 2024 · 0 comments
Open

CJS nextLoader callback in loader hook doesn't use changed URL #56376

awto opened this issue Dec 27, 2024 · 0 comments

Comments

@awto
Copy link

awto commented Dec 27, 2024

Version

v23.5.0

Platform

Darwin MBP 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:04 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6020 arm64

Subsystem

loader

What steps will reproduce the bug?

I believe there is a typo at node/lib/internal/modules/cjs
/loader.js:1147
.

It doesn't use urlFromHook but only the original url. So, the hook cannot change the URL for the next stage in the chain.

How often does it reproduce? Is there a required condition?

always

What is the expected behavior? Why is that the expected behavior?

Since there is a parameter for passing URL to nextLoad it should be used.

What do you see instead?

The parameter passed to nextLoad is ignored.

Additional information

No response

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

No branches or pull requests

1 participant