angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

[BUG] CLI overwrites base href by default

Open danielsogl opened this issue 9 years ago • 4 comments

Please provide us with the following information:

Since beta 28.3, when i use ng build or ng build --prod , the CLI automaticly overwrites the index.html base href path to '' I don't want to use now --bh in every build step.

Update: I also have this problem in Beta 29

By default, the CLI shouldn't override the base href path.

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Windows 7

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

angular-cli: 1.0.0-beta.28.3
node: 6.9.4
os: win32 x64
@angular/common: 2.4.5
@angular/compiler: 2.4.5
@angular/compiler-cli: 2.4.5
@angular/core: 2.4.5
@angular/forms: 2.4.5
@angular/http: 2.4.5
@angular/platform-browser: 2.4.5
@angular/platform-browser-dynamic: 2.4.5
@angular/router: 3.4.5

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

Updated angular-cli from beta 26 to beta 28.3


Thanks! We'll be in touch soon.

danielsogl avatar Feb 02 '17 06:02 danielsogl

I have the exact same problem. Just updated from 26 to 28 and now my base href in the index.html is ignored.

kevfuzz avatar Feb 02 '17 09:02 kevfuzz

Same problem

medeirosrich avatar Feb 02 '17 18:02 medeirosrich

This seems partially caused by commit e15433e74a8832f5eec57df5776894a19dd5d344

A change in build.ts --old { name: 'base-href', type: String, default: null, aliases: ['bh'] }, --new { name: 'base-href', type: String, default: '/', aliases: ['bh'] },

speige avatar Feb 03 '17 03:02 speige

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.