Open melchiebooy opened 2 years ago
Hi @melchiebooy !
serve dist -s
Did you mean npm run serve dist -s
I tried to run npm run serve
without any errors.
Hi @melchiebooy !
serve dist -s
Did you mean
npm run serve dist -s
I tried to run
npm run serve
without any errors.
Hi @romfrancois,
Thank you for having a look!
No i did not mean that.
Nom run serve works, but then its not built for production. So the problem arises when building first and then trying to serve it in production.
Well if Im not mistaken and according to the doc serve -s
does
-s, --single Rewrite all not-found requests to
index.html
so given the favicon is not found I would expect another request on index.html that would reload and add stuff that was already there?
Any reason for using that flag?
Having said that I don't think that has anything to do with the library itself. The compilation works and the basics of serving and making it work as well.
Well if Im not mistaken and according to the doc
serve -s
does-s, --single Rewrite all not-found requests to
index.html
so given the favicon is not found I would expect another request on index.html that would reload and add stuff that was already there?
Any reason for using that flag?
Having said that I don't think that has anything to do with the library itself. The compilation works and the basics of serving and making it work as well.
Well something in the charting widget is making a request, which fails. I can't find what it is, do you have any suggestion of how to find out?
The -s flag is necessary to make Single page applications work properly. It is the default setting in production. Below is a problem that immediately arises if this -s rule is not used.
Describe the bug
I have been fighting this for weeks... When deploying to production, a syntax error occours and breaks the loading of the charting library. This syntax error triggers a redirect which loads index.html again hence the double navigation bar, see screenshot. This error can be somewhat temporarily mitigated by turning of the -s flag or the redirect rule on AWS. But this caused alot of other problems instead...
To Reproduce
Steps to reproduce the behavior:
Expected behavior charting module loads, see below (works when running command serve dist)
Screenshots this is the error message i see in the console, I suspect this triggers the redirect