That file never gets sent into the new ModuleScopePlugin constructor, because you only send in the values of the aliasLocal map into the dirs argument of expandPluginsScope.
Then you set dirs to filter out any elements that aren't directories, so it also doesn't get concatenated in files.
The result is that you'll still get errors complaining that any imports of @myorg/mylib is outside of the src/ directory because they're not exceptions in the ModuleScopePlugin:
Module not found: You attempted to import /home/myrepo/myorg/libs/mylib/src/index.ts which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
To fix this, either pass the values of aliasLocal into the last 2 args of expandPluginsScope, or don't overwrite the dirs variable when filtering out directories.
When my paths are something like:
That file never gets sent into the new ModuleScopePlugin constructor, because you only send in the values of the
aliasLocal
map into thedirs
argument ofexpandPluginsScope
.Then you set
dirs
to filter out any elements that aren't directories, so it also doesn't get concatenated infiles
.The result is that you'll still get errors complaining that any imports of
@myorg/mylib
is outside of thesrc/
directory because they're not exceptions in the ModuleScopePlugin:Module not found: You attempted to import /home/myrepo/myorg/libs/mylib/src/index.ts which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
To fix this, either pass the values of
aliasLocal
into the last 2 args ofexpandPluginsScope
, or don't overwrite thedirs
variable when filtering out directories.