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?
I am deploying my app to S3. From what I read behind the scenes,
react-snap
copies the originalindex.html
to200.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 toapp.js
is still there, it all goes crazy ascomponentDidMount()
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 originalindex.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?