We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 233338f commit e3e04c5Copy full SHA for e3e04c5
packages/@ngtools/webpack/src/resource_loader.ts
@@ -36,6 +36,11 @@ export class WebpackResourceLoader {
36
throw new Error('WebpackResourceLoader cannot be used without parentCompilation');
37
}
38
39
+ // Simple sanity check.
40
+ if (filePath.match(/\.[jt]s$/)) {
41
+ return Promise.reject('Cannot use a JavaScript or TypeScript file for styleUrl.');
42
+ }
43
+
44
const compilerName = `compiler(${this._uniqueId++})`;
45
const outputOptions = { filename: filePath };
46
const relativePath = path.relative(this._context || '', filePath);
0 commit comments