diff --git a/packages/ngtools/webpack/src/resource_loader.ts b/packages/ngtools/webpack/src/resource_loader.ts index 54873f7b3e1b..cb3cbc234cdb 100644 --- a/packages/ngtools/webpack/src/resource_loader.ts +++ b/packages/ngtools/webpack/src/resource_loader.ts @@ -56,7 +56,7 @@ export class WebpackResourceLoader { // Simple sanity check. if (filePath.match(/\.[jt]s$/)) { return Promise.reject( - 'Cannot use a JavaScript or TypeScript file for styleUrl or templateUrl.', + `Cannot use a JavaScript or TypeScript file (${filePath}) in a component's styleUrls or templateUrl.`, ); }