File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,12 @@ export function prepareBrowserConfig(
46
46
optionsStarter . deleteOutputPath = false ;
47
47
}
48
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
+
49
55
if ( options . consolelogs ) {
50
56
// Write the config to a file, and then include that in the bundle so it loads on window
51
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
- }
67
70
optionsStarter . scripts . push ( {
68
71
input : configPath ,
69
72
bundleName : 'consolelogs' ,
You can’t perform that action at this time.
0 commit comments