You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running scripts/dev.sh (which calls trunk) runs a version of RTMS with broken images, broken content scripts, broken manifests, etc. This is because dev mode serves the index from /, while production serves all the static assets from /assets/ (aside from index.html, which is special-cased). So if I set the favicon URL to /assets/favicon.ico, then it'll load in prod mode but fail in dev mode. And if I set it to /favicon.ico it'll load in dev mode and fail in prod mode.
An obvious thing to try is to put everything inside an /assets folder in dev mode. But this doesn't work because 1) it needs to serve index.html from /, and 2) if you make index.html separate, and put everything else in /assets/, then the URLs in prod will be /assets/assets/, because Trunk doesn't distinguish dev and prod builds.
Another solution is to do the above, but also make a copy of every asset in / as well. But 1) Trunk doesn't have a notion of making 2 copies of everything (though maybe you could do this in post-build hooks, and 2) this is very ugly.
The text was updated successfully, but these errors were encountered:
Running
scripts/dev.sh
(which callstrunk
) runs a version of RTMS with broken images, broken content scripts, broken manifests, etc. This is because dev mode serves the index from/
, while production serves all the static assets from/assets/
(aside fromindex.html
, which is special-cased). So if I set the favicon URL to/assets/favicon.ico
, then it'll load in prod mode but fail in dev mode. And if I set it to/favicon.ico
it'll load in dev mode and fail in prod mode.An obvious thing to try is to put everything inside an
/assets
folder in dev mode. But this doesn't work because 1) it needs to serveindex.html
from/
, and 2) if you makeindex.html
separate, and put everything else in/assets/
, then the URLs in prod will be/assets/assets/
, because Trunk doesn't distinguish dev and prod builds.Another solution is to do the above, but also make a copy of every asset in
/
as well. But 1) Trunk doesn't have a notion of making 2 copies of everything (though maybe you could do this in post-build hooks, and 2) this is very ugly.The text was updated successfully, but these errors were encountered: