with nested IonicPage segments (ex. /users/add). All scripts (like chunks 0.main.js etc) are loaded by realitve paths so in my example browser tries to load /users/build/0.main.js. This can be fixed just by adding <base href="/"> at the top of <head>. But in ionic serve there are scripts injected just at the top of of <head> so they're always before <base href="/">, so they're 404'ed:
Note: for support questions, please use one of these channels:
https://forum.ionicframework.com/ http://ionicworldwide.herokuapp.com/
Short description of the problem:
I'm using path location strategy in Ionic app:
with nested IonicPage segments (ex.
/users/add
). All scripts (like chunks 0.main.js etc) are loaded by realitve paths so in my example browser tries to load/users/build/0.main.js
. This can be fixed just by adding<base href="/">
at the top of<head>
. But inionic serve
there are scripts injected just at the top of of<head>
so they're always before<base href="/">
, so they're 404'ed:What behavior are you expecting?
If all the script should be loaded by relative paths (as it is now), __ion-dev-server should be injected at the end of
</head>
Steps to reproduce:
path
in your app config/users/add
) -(but I'm using nested tabs view)ionic serve
http://localhost:8100/users/add
- in console you'll see 404 for all js and css filesWhich @ionic/app-scripts version are you using? 1.3.8
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)