feat(experimental-extractor): reconsider includeDeps #2362
+104
−52
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Reconsider deps externalization in the experimental extractor.
Before
it used a
packages: externalfrom esbuild which is:Despite that sounds ok, it made impossible to include dependecies from monorepo which are not using typescript path aliases.
Current
All import paths that "look like" package imports including typescript path aliases are ignored. You have to manually specify what you want to be included in analyzing using
includeDeps.Migration path
This is a breaking change for experimental extractor (since it's experimental we don't bump the major version for that change) users have to migrate their configurations to support this change.
resolveEsbuildOptionsoption which unsetspackages: externalyou can delete it now.includeDepsoption.resolveEsbuildOptionsfor your project. For example setupaliasesto match tsconfig paths.Motivation
It's quite hard to find a right settings to "rule them all", one configuration would suits better monorepos with path aliases another with package symlinks thru the pnpm.
This new settings is more aligned with modern monorepo layout proposed by NX, and should s
Types of changes
Fixes #1973 #2250
Checklist