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
{{ message }}
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
git clone https://github.com/sveltejs/sapper-template # commit 9c3c45a as of todaycd sapper-template
npm i
npm run build
npm start
curl -sL 'http://localhost:3000/index.html'# doesn't contain any <script>s
It seems localhost:3000/ contains the correct <script>, but localhost:3000/index.html does not. Unfortunately this means the ServiceWorker caches the incorrect index.html file, and thus the app breaks when you reload it.
The text was updated successfully, but these errors were encountered:
Whether this should be added to sapper-template is up for grabs. But I think at best this comment is misleading and should maybe be removed. If you uncomment it, it doesn't actually work AFAICT. (But the above modifications do.)
I have taken another look at this issue. Now the issue is that neither sapper build nor sapper export actually creates an index.html file, so it 404s. That means that this comment is still misleading, as uncommenting that block of code results in a broken app because the Service Worker can't actually serve a shell index.html file.
I'll keep looking into this, but it probably needs a new issue since this issue doesn't describe the problem.
Steps to repro:
It seems
localhost:3000/
contains the correct<script>
, butlocalhost:3000/index.html
does not. Unfortunately this means the ServiceWorker caches the incorrectindex.html
file, and thus the app breaks when you reload it.The text was updated successfully, but these errors were encountered: