fix(source-inclusion): detect traceDependencies from dependency resources correctly #525
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.
#400
There are actually two issues preventing #400 from working. One is fixed by this PR, and the other one seems to be #342.
To reproduce #400:
node_modules
: my-dependency.zipThe setup is as follows. The aurelia-cli-400 app has a dependency called
my-dependency
which has two files (resource1.js
andresource2.js
) whereresource2.js
is a dependency ofresource1.js
. Themy-dependency
dependency is defined in thevendor-bundle
:What you'd expect using this setup is that
resource1.js
ends up in thevendor-bundle
butnode_modules/my-dependency/resource2.js
does not. Without the changes in this PR bothresource1.js
andresource2.js
are inapp-bundle.js
. This can be explained due to the glob pattern in SourceInclusion being invalid (as mentioned in #400), which causes neitherresource1.js
orresource2.js
to be included in thevendor-bundle
. Due to #342 they end up in the app-bundle instead.With these changes, only
resource1.js
ends invendor-bundle
, which is what you'd expect. Although #342 is causingresource2.js
to be included inapp-bundle
, so #400 is not completely "fixed" by this PR