diff --git a/builders/utils/index.ts b/builders/utils/index.ts index af04cef..e290207 100644 --- a/builders/utils/index.ts +++ b/builders/utils/index.ts @@ -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( @@ -61,9 +67,6 @@ export function prepareBrowserConfig( options.consolelogsPort } }` ); - if (!optionsStarter.scripts) { - optionsStarter.scripts = []; - } optionsStarter.scripts.push({ input: configPath, bundleName: 'consolelogs', diff --git a/package.json b/package.json index 08e92de..d3fc5d4 100644 --- a/package.json +++ b/package.json @@ -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",