Closed gernotkogler closed 2 months ago
The assets are read and included in the ErrorTracker package compilation. You shouldn't have to do anything special to get both the CSS and JS working.
I've just started a fresh new Phoenix project and added ErrorTracker as a dependency to test this. In my case the assets are working as expected.
Are you using the latest ErrorTracker version (at the time of this comment it is v0.2.1)? Do you get an errors during compilation?
I have a fairly new phoenix app and all deps are up to date. I deleted _build
and deps
and rebuilt everything from scratch, without errors. I even deleted my app.css
, but I don't get any css styling for the error tracker pages.
What version of ErrorTracker are you using @gernotkogler? You can see it by running mix deps | grep error_tracker
I initially experienced this same issue. In my case it was caused by my app's CSP blocking the styles/scripts. Adding 'unsafe-inline'
to both style-src
and script-src
fixed it for me. Any chance you've got a CSP in your app that might be blocking things?
Thank you so much, @numso! That fixed it! I'm still fairly new to CSP
For the record: I had to add style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline'
to my CSP. Without 'self', my own css / js didn't work anymore
I was wondering where the issue could be, since both CSS and JS are inlined in the ErrorTracker dashboard. This makes sense.
Should be probably mentioned in the documentation as others may experience the same problem.
Maybe just be a newbie question, but I get zero styling on
error_tracker_dashboard
. I followed the setup guide but I don't know how the assets should be merged.