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.

Compatibility with redirects/routing libraries

See original GitHub issue

Is your feature request related to a problem? Please describe.

We use react-router and have a _redirects file that looks like this:

/*  /index.html   200

Describe the solution you’d like

It would be great if the express server in this plugin implemented all redirects in the _redirects file.

Describe alternatives you’ve considered

For this use case it might be possible to serve the content with serve --single but we’re not sure how to configure that on Netlify with this plugin.

Additional context

End of plugin output:

❯ Plugin @netlify/plugin-lighthouse ran successfully
  Summary for directory 'build': Performance: 4, Accessibility: 81, Best Practices: 67, SEO: 100, Progressive Web App: 30
  Summary for directory 'build/menu': undefined

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
erezrokahcommented, Sep 14, 2021

Thanks! This seems like the right solution for us. How do we configure this? I don’t see any documentation in the README for how one might run the CLI or arbitrary commands before/after the plugin runs.

This is not implement yet. I suggested it as a way to resolve this feature request.

Sorry for the confusion

0reactions
chetboxcommented, Sep 14, 2021

The plugin can start the CLI and close it when the audit is finished

Thanks! This seems like the right solution for us. How do we configure this? I don’t see any documentation in the README for how one might run the CLI or arbitrary commands before/after the plugin runs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Redirect in React Router V6 with useNavigate hook - Refine Dev
We'll discover how to perform a redirect using useNavigate in React Router V6.
Read more >
React Router Redirect: How to Use in Your App - CopyCat Blog
In this article, we'll look at using the React Router v6 to implement a redirect in a React application so you can use...
Read more >
React Router Tutorial: Redirect Like a Pro - Toptal
In this React Router tutorial, I start with a key concept and explain my choice of routing library. I then detail how to...
Read more >
Programmatic Navigation in React using react-router
We can redirect using <Redirect> component by simply passing the route we want ... It already comes loaded in the react-router-dom library.
Read more >
How React Hooks can replace React Router - LogRocket Blog
The hookrouter module exports a useRedirect() Hook that can take a source route and a target route as parameters. useRedirect('/user', '/ ...
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