react-snap
react-snap copied to clipboard
Why app.js is still linked in index.html after the prerender?
I am deploying my app to S3. From what I read behind the scenes, react-snap
copies the original index.html
to 200.html
which is great because I can use it as a fallback.
After a successful build I am getting index.html
nicely pre-rendered but due to the fact the link to app.js
is still there, it all goes crazy as componentDidMount()
Ajax requests are getting triggered etc.
Only when I manually delete that file (that causes 404 in index.html
) - all works as expected.
I am using webpack for compression that generates <script src="app/app.js?9784d337027f3150ee11"></script>
in the original index.html
(before react-snap execution) after <div id="app"></div>
but before the end of <body>
.
Does anyone encountered the similar issue? Any idea what I am doing wrong?
did you fix this? or not using this package anymore?