Skip to content

Commit 388e1ad

Browse files
mhartingtonimhoffd
authored andcommitted
fix(build): handle no scripts in angular (#182)
Fixes #179
1 parent 90ffd14 commit 388e1ad

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

builders/utils/index.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,15 @@ export function prepareBrowserConfig(
6161
options.consolelogsPort
6262
} }`
6363
);
64-
if (optionsStarter.scripts) {
65-
optionsStarter.scripts.push({
64+
if (!optionsStarter.scripts) {
65+
optionsStarter.scripts = [];
66+
}
67+
optionsStarter.scripts.push({
6668
input: configPath,
6769
bundleName: 'consolelogs',
6870
lazy: false,
6971
});
70-
optionsStarter.scripts.push({
72+
optionsStarter.scripts.push({
7173
input: getSystemPath(
7274
join(
7375
normalize(__dirname),
@@ -78,7 +80,6 @@ export function prepareBrowserConfig(
7880
bundleName: 'consolelogs',
7981
lazy: false,
8082
});
81-
}
8283
}
8384

8485
if (options.cordovaMock) {

0 commit comments

Comments
 (0)