[v4.6.0] bug: svg file is not found when use baseHref
See original GitHub issueBug Report
Ionic version:
[x] 4.6
Current behavior:
all of ionic icon svg file is not found (404)
Expected behavior:
Steps to reproduce:
Related code:
https://github.com/Jimmysh/ionic-4.6.0-bug
angular.json
{
"$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
"version": 1,
"defaultProject": "app",
"newProjectRoot": "projects",
"projects": {
"app": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "www",
"index": "src/index.html",
"main": "src/main.ts",
"baseHref": "/en/", --- use baseHref
Other information:
Ionic info:
Ionic:
ionic (Ionic CLI) : 5.0.0-beta.2 (/Users/jimmy/.config/yarn/global/node_modules/ionic)
Ionic Framework : @ionic/angular 4.6.0
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.3.9
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.5.1
Utility:
cordova-res : 0.3.0
native-run : not installed
System:
NodeJS : v10.16.0 (/Users/jimmy/.nvm/versions/node/v10.16.0/bin/node)
npm : 6.9.0
OS : macOS
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:7 (3 by maintainers)
Top Results From Across the Web
[v4.6.0] bug: svg file is not found when use baseHref #18637
Thanks for the issue. It looks like you are trying to modify the baseHref of your application. Certain things like ionicons need to...
Read more >SVG filter url is not working in angular 4
Seems like angular adds tag like <base href="/dist/"> and safari or firefox can't resolve url. To fix it, you should prepend filter id's...
Read more >Safari Technology Preview Release Notes
If you see bugs or unexpected behavior with the interface of Safari Technology Preview, please file feedback with Apple's Feedback Assistant.
Read more >angular js app 404 not found on kubernetes
I followed the latest tutorial and it works perfectly fine. I presume you have made the file with the wrong name. Instead of...
Read more >Overview
Phishing site detected (based on logo template match). HTML body contains low number of good links. HTML title does not match URL. Suspicious...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This was fixed in 4.6.1.
Thanks for the issue. It looks like you are trying to modify the
baseHref
of your application. Certain things like ionicons need to be served from the root in order to work properly.If you would like to change your app’s routing structure, we recommend using the Angular Router to accomplish this, not a project/build configuration file.
I am going to close this as this is not an Ionic bug.
Thanks!