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

Rehome moved requests to real on-disk files #1547

Merged
merged 1 commit into from
Jul 18, 2023
Merged

Rehome moved requests to real on-disk files #1547

merged 1 commit into from
Jul 18, 2023

Commits on Jul 18, 2023

  1. Rehome moved requests to real on-disk files

    When we're about to default resolving outbound from a moved package, we need to rehome the request back to the original package. Previously, we did this by moving the fromFile into the original package, but keeping its own relative path withn the package.
    
    This path doesn't actually exist, but that didn't matter to webpack. Unfortunately it does matter to vite, which for dubious reaons checks that the importing file actually exists before being willing to use it as the base for resolution.
    
    So instead we need to rehome to a file that exist, so we'll use `package.json` like we generally do when we want to mean "from this package".
    
    However, we also need to *undo* this rehoming if the request falls through to our own fallback. Previously that was easy because we still had the true within-package path in the module specifier. Now we need an additional mechanism for propagating extra metadata along with requests.
    ef4 committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    1baf9cd View commit details
    Browse the repository at this point in the history