Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions builders/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ export function prepareBrowserConfig(
optionsStarter.deleteOutputPath = false;
}

// Initialize an empty script array to make sure assets are pushed even when
// scripts is not configured in angular.json
if (!optionsStarter.scripts) {
optionsStarter.scripts = [];
}

if (options.consolelogs) {
// Write the config to a file, and then include that in the bundle so it loads on window
const configPath = getSystemPath(
Expand All @@ -61,9 +67,6 @@ export function prepareBrowserConfig(
options.consolelogsPort
} }`
);
if (!optionsStarter.scripts) {
optionsStarter.scripts = [];
}
optionsStarter.scripts.push({
input: configPath,
bundleName: 'consolelogs',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@types/ws": "^6.0.1",
"commitizen": "^3.0.2",
"cz-conventional-changelog": "^2.1.0",
"husky": "^3.0.0",
"husky": "^4.0.6",
"lint-staged": "^9.1.0",
"rimraf": "^2.6.2",
"semantic-release": "^15.9.17",
Expand Down