-
Notifications
You must be signed in to change notification settings - Fork 18
Reloads with default Svelte template #16
Comments
Can you please upload your code somewhere and share it here? |
The code here: https://codesandbox.io/s/zk61vjnlqp has the problem. If you just remove lines:
On codesandbox it doesn't reload as you can see (but codesandbox is still not good with Svelte, you can download the zip). On my notebook I run with I think the problem here can be with |
This is probably because your dev server has not enabled SPA mode. Which is further explained in "First Things First" section on README. Svelte template uses So in this case simply changing this line in your
to this:
Should do the trick. |
Ok now it works (you genius) but there is a problem with the same code (https://codesandbox.io/s/zk61vjnlqp, edited). I added a new page:
If I edit something on that page or simply reload the browser has an error (on an URL let's say like:
Do you think now the problem is I'm using |
Check your e.g. ...
<link rel='stylesheet' href='global.css'>
<link rel='stylesheet' href='bundle.css'>
...
<script src='bundle.js'></script>
... to: ...
<link rel='stylesheet' href='/global.css'>
<link rel='stylesheet' href='/bundle.css'>
...
<script src='/bundle.js'></script>
... |
You genius. |
Using the default template (https://github.com/sveltejs/template) and a simple example of Svero I have a problem when the template on
npm run dev
reloads after a change in code.The browser crashes because, let's say
/page
, "is not found".Maybe this problem is not strictly related to Svero but have you an hint for us, newbies people?
The text was updated successfully, but these errors were encountered: