Open ryan-roemer opened 4 years ago
I have to use require('../assets/banner.png').default
to make it work in my presentation. Perhaps this helps.
@mikebarkmin thank you for the comment - this issue is in reference to our deployed react-static documentation site and not within user-created slides themselves.
@ryan-roemer do SSR'd assets regularly operate like a commit hash? Although I'm not seeing the full 646e170b7206d8b395cde42f9072ac68.webm
asset in that dist, there is a demo-presentation.646e170b.webm
which appears to be the same asset but named differently. 🤔 If this is consistent, can we reference the other naming convention?
I’m not exactly sure what is up as I am unfamiliar with the tools used for our docs, but there is definitely something at issue with our build configuration
What appears to work in development, definitely is not built correctly for production
Oh, and that asset in question doesn’t have a commit hash, I believe it is a content hash if I were guessing
I’m seeing missing assets in the dev console but not visually on the page once it's up and running. I’ve checked and I get this:
Reproduction
Navigate to
http://localhost:4000/open-source/spectacle/
and then look at dev console for lots of 404 assets like our.webm
preview.Notes
There are no visual effects, so what my theory is is that our SSR page has broken assets that we don’t see because client-side takes over before it’s noticeable. For an example, we have this component:
It uses this data:
This translates to the following in SSR’ed HTML (when prettified)
But if you look in the
dist/
directory there is no file whatsoever named646e170b7206d8b395cde42f9072ac68.webm
using find.Instead what we do have emitted is in relevant part this: