Open bnjmnrsh opened 10 months ago
Another option may be to inline the critical styles.
https://github.com/parcel-bundler/parcel/discussions/5263 https://parceljs.org/languages/html/#inline-scripts-and-styles https://parceljs.org/features/bundle-inlining/
Our router and code seems to work correctly when an unknown
?section=taco
query is passed, and it also falls back gracefully to the GH Pages 404.index when the route is one layer deep, i.e.https://bnjmnrsh-projs.github.io/signal-v-noise/tacos
However, if an unknown route is passed, that is more than one layer deep, i.e.
https://bnjmnrsh-projs.github.io/signal-v-noise/some/tacos/
, the 404-page loads, but the styles do not.This may, in part, be because the site is in a sub-directory of the https://github.com/bnjmnrsh-projs/ namespace.
Regardless, we are using relative URLs for css, etc., and a fully qualified URL is needed instead. Because Parcel generates these assets dynamically at build time, we will have to explore how this can be achieved.
This is really an edge case, and given the goal of moving to Vite, it may need to be revisited after that work has been done.