We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4bea3a4 commit c8bb37bCopy full SHA for c8bb37b
1 file changed
builders/utils/index.ts
@@ -46,6 +46,12 @@ export function prepareBrowserConfig(
46
optionsStarter.deleteOutputPath = false;
47
}
48
49
+ // Initialize an empty script array to make sure assets are pushed even when
50
+ // scripts is not configured in angular.json
51
+ if (!optionsStarter.scripts) {
52
+ optionsStarter.scripts = [];
53
+ }
54
+
55
if (options.consolelogs) {
56
// Write the config to a file, and then include that in the bundle so it loads on window
57
const configPath = getSystemPath(
@@ -61,9 +67,6 @@ export function prepareBrowserConfig(
61
67
options.consolelogsPort
62
68
} }`
63
69
);
64
- if (!optionsStarter.scripts) {
65
- optionsStarter.scripts = [];
66
- }
70
optionsStarter.scripts.push({
71
input: configPath,
72
bundleName: 'consolelogs',
0 commit comments