New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base-href still not recognized / applied properly #4568
Comments
Here's some history: #3600 I don't think we want to add this option because it doesn't fit into the vast majority of how people are using the Ionic Framework. I would recommend splitting up the build commands and not using Please keep in mind the |
I saw that task (hence "still" in title). Actually, in there, your comment from 2y ago:
Anything changed in that regard? Also, that's not even cordova related thing, Angular already supports that property in commandline. If not using ionic cordova build, then what? |
Ionic is more focused on improving the cross-platform aspect of PWAs with Capacitor, so I may close that issue sometime with an explanation. Basically, PWA support is better solved Capacitor and with your framework's tooling. We're not heavily investing in Cordova anymore.
I just meant you can use |
Would that make any difference, though? (using |
@dwieeb @sebastian-zarzycki-es I have the same issue, i used to build my webapp with I check the index.html inside /www have a any difference or includes something related with the new base-href, but no references to it. i still get the expected 404 error. f.e: initializing the web tries to get from /assets/** instead of version1/assets/** There is any solution ?? Thanks!! |
No. You have to change it manually or change your build process to use two subcommands stated above. Keep in mind that the resulting build won't be in /www. |
it worries me that in the index.html it does not appear any reference to All the builds i make with the diferents values are created in the build folder |
Description:
When
--base-href
is passed to the build command (i.e. for browser target), it doesn't result in index.html file with proper<base href />
tagSteps to Reproduce:
ionic cordova build browser -- --base-href=/ionic/
Output:
Resulting
index.html
contents:Expected:
as when building regular Angular app.
My
ionic info
:Other Information:
It seems that it is passed down the line, but just not respected. That command above results first in
ng run gpa-mobile:ionic-cordova-build --platform=browser
and later in
cordova build browser --base-href=/ionic/
But the index.html is not changed.
The text was updated successfully, but these errors were encountered: