Skip to content

Commit 7a643b1

Browse files
alan-agius4kyliau
authored andcommitted
fix(@ngtools/webpack): update error message to reference templateUrl
Fixes angular#12693
1 parent e45a57a commit 7a643b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/ngtools/webpack/src/resource_loader.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ export class WebpackResourceLoader {
4949

5050
// Simple sanity check.
5151
if (filePath.match(/\.[jt]s$/)) {
52-
return Promise.reject('Cannot use a JavaScript or TypeScript file for styleUrl.');
52+
return Promise.reject(
53+
'Cannot use a JavaScript or TypeScript file for styleUrl or templateUrl.',
54+
);
5355
}
5456

5557
const outputOptions = { filename: filePath };

0 commit comments

Comments
 (0)