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

Improve bundling for hoisted dependencies #14708

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

msujew
Copy link
Member

@msujew msujew commented Jan 8, 2025

What it does

Closes #14707

This change just sets the paths field whenever using require.resolve to correctly find the hoisted dependencies from the point they are imported.

Note that we have a reference to node-pty in our generated webpack config that cannot be refactored to use require.resolve. If this dependency is not hoisted, the webpack build will fail with a helpful error message.

How to test

Use #14481 and replace "node_modules/trash" with "packages/filesystem/node_modules/trash" in your package-lock.json file. Same with other dependencies such as @vscode/ripgrep, drivelist or @parcel/watcher.

Review checklist

Reminder for reviewers

@msujew msujew added the bundle Related to webpack bundling label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bundle Related to webpack bundling
Projects
Status: Waiting on reviewers
Development

Successfully merging this pull request may close these issues.

Make NativeWebpackPlugin resilient to Hoisting
1 participant