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(
4646 optionsStarter . deleteOutputPath = false ;
4747 }
4848
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+
4955 if ( options . consolelogs ) {
5056 // Write the config to a file, and then include that in the bundle so it loads on window
5157 const configPath = getSystemPath (
@@ -61,9 +67,6 @@ export function prepareBrowserConfig(
6167 options . consolelogsPort
6268 } }`
6369 ) ;
64- if ( ! optionsStarter . scripts ) {
65- optionsStarter . scripts = [ ] ;
66- }
6770 optionsStarter . scripts . push ( {
6871 input : configPath ,
6972 bundleName : 'consolelogs' ,
You can’t perform that action at this time.
0 commit comments