Skip to content

fix(commonjs): crawl dynamicRequireRoot outside cwd #1859

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ambarvm
Copy link

@ambarvm ambarvm commented Apr 5, 2025

Rollup Plugin Name: {commonjs}

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

List any relevant issue numbers:

resolves #1855

Description

After switching to fdir for globbing, it was no longer possible to have dynamicRequireTargets outside cwd as fdir only crawls cwd by default. dynamicRequireTargets outside cwd is often required when using npm workspaces as packages are hoisted to the node_modules in workspace root.
dynamicRequireRoot is passed to fdir's crawl() to fix this.

@ambarvm ambarvm requested a review from shellscape as a code owner April 5, 2025 10:41
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.

[@rollup/plugin-commonjs] no way to use path outside current dir in dynamicRequireTargets
1 participant