Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6a93451

Browse files
sumitarorafilipesilva
authored andcommitted
fix(@angular/cli): fix empty style urls
1 parent aaf29dd commit 6a93451

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

‎packages/@ngtools/webpack/src/loader.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ function _getResourcesUrls(refactor: TypeScriptFileRefactor): string[] {
361361
const arr = <ts.ArrayLiteralExpression[]>(
362362
refactor.findAstNodes(node, ts.SyntaxKind.ArrayLiteralExpression, false));
363363
if (!arr || arr.length == 0 || arr[0].elements.length == 0) {
364-
return;
364+
returnacc;
365365
}
366366

367367
arr[0].elements.forEach((element: ts.Expression) => {
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { writeMultipleFiles } from '../../../utils/fs';
2+
import { ng } from '../../../utils/process';
3+
4+
5+
export default function () {
6+
7+
return Promise.resolve()
8+
// Write assets.
9+
.then(_ => writeMultipleFiles({
10+
'./src/app/app.component.ts': `
11+
import { Component } from '@angular/core';
12+
13+
@Component({
14+
selector: 'app-root',
15+
templateUrl: './app.component.html',
16+
styleUrls: []
17+
})
18+
export class AppComponent {
19+
title = 'app';
20+
}
21+
`
22+
}))
23+
.then(() => ng('build'));
24+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /