File tree 3 files changed +13
-2
lines changed
3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 79
79
"type" : " string" ,
80
80
"description" : " URL where files will be deployed."
81
81
},
82
+ "baseHref" : {
83
+ "type" : " string" ,
84
+ "description" : " Base url for the application being built."
85
+ },
82
86
"index" : {
83
87
"type" : " string" ,
84
88
"default" : " index.html" ,
Original file line number Diff line number Diff line change @@ -97,7 +97,8 @@ export class NgCliWebpackConfig {
97
97
public mergeConfigs ( buildOptions : BuildOptions , appConfig : any ) {
98
98
const mergeableOptions = {
99
99
outputPath : appConfig . outDir ,
100
- deployUrl : appConfig . deployUrl
100
+ deployUrl : appConfig . deployUrl ,
101
+ baseHref : appConfig . baseHref
101
102
} ;
102
103
103
104
return Object . assign ( { } , mergeableOptions , buildOptions ) ;
Original file line number Diff line number Diff line change @@ -10,5 +10,11 @@ export default function() {
10
10
}
11
11
12
12
return ng ( 'build' , '--base-href' , '/myUrl' )
13
- . then ( ( ) => expectFileToMatch ( 'dist/index.html' , / < b a s e h r e f = " \/ m y U r l " > / ) ) ;
13
+ . then ( ( ) => expectFileToMatch ( 'dist/index.html' , / < b a s e h r e f = " \/ m y U r l " > / ) )
14
+ . then ( ( ) => updateJsonFile ( '.angular-cli.json' , configJson => {
15
+ const app = configJson [ 'apps' ] [ 0 ] ;
16
+ app [ 'baseHref' ] = '/myUrl' ;
17
+ } ) )
18
+ . then ( ( ) => ng ( 'build' ) )
19
+ . then ( ( ) => expectFileToMatch ( 'dist/index.html' , / < b a s e h r e f = " \/ m y U r l " > / ) )
14
20
}
You can’t perform that action at this time.
0 commit comments