question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ability to define a custom 404 page in the routes declaration

See original GitHub issue

Would be pretty neat to be able to set up a route which will be displayed when nothing matches in the routes array. Would be easier than to upload an extra 404.html somewhere (where, by the way). So basically like this:

const routes = [ {
    name: "/404",
    component: NotFound
  }]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jorgegorkacommented, Apr 30, 2020

Hi @Gh05d

I’ve published a new version 5.6.0 including your suggestion for a custom 404 component. Thank you very much for your help and contribution.

0reactions
renegat59commented, May 3, 2020

@jorgegorka I actually found out what was the problem with path and made a PR: https://github.com/jorgegorka/svelte-router/pull/64

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Create a Great Custom 404 Error Page (with Examples)
Step 1: Design the Page · A clear statement that the page the user requested isn't available · Advice to help your users...
Read more >
How to Creating a custom 404 Page with React Routers?
A 404 page is what a user sees when they try to reach a non-existent page on your site (because they've clicked on...
Read more >
How to setup 404 page in angular routing ? - GeeksforGeeks
To set up a 404 page in the angular routing, we have to first create a component to display whenever a 404 error...
Read more >
Handling 404 Routes in React with a Not Found component
In this post you'll learn how to handle 404 routes in React Router and provide a fallback component for displaying an imfamous 404...
Read more >
How to Set a Custom 404 Page With .htaccess
Create or Modify a Custom 404 Page via .htaccess ... Login to your cPanel. Under the Files section click on File Manager. ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found