From bf13526bf26d967dd1198134a7a8f8305334560f Mon Sep 17 00:00:00 2001 From: Chunpeng Huo Date: Thu, 14 May 2020 11:32:55 +1000 Subject: [PATCH] fix(cli-bundler): warn user about missed source matcher closes #1182, replaces #1160 --- lib/build/bundled-source.js | 6 +++++- lib/build/bundler.js | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/build/bundled-source.js b/lib/build/bundled-source.js index 14ff2f8ca..d9b5a6a73 100644 --- a/lib/build/bundled-source.js +++ b/lib/build/bundled-source.js @@ -91,7 +91,11 @@ exports.BundledSource = class { this.file = file; this._contents = null; this.requiresTransform = true; - this.includedIn.requiresBuild = true; + if (this.includedIn) { + this.includedIn.requiresBuild = true; + } else { + logger.warn(this.path + ' is not captured by any bundle file. You might need to adjust the bundles source matcher in aurelia.json.'); + } } transform() { diff --git a/lib/build/bundler.js b/lib/build/bundler.js index ef021f159..8969a5d9c 100644 --- a/lib/build/bundler.js +++ b/lib/build/bundler.js @@ -335,6 +335,7 @@ function subsume(bundles, item) { return; } } + logger.warn(item.path + ' is not captured by any bundle file. You might need to adjust the bundles source matcher in aurelia.json.'); } function normalizeKey(p) {