solid-start
solid-start copied to clipboard
[packages start-netlify]: Fix `_redirects` to check for existing file or netlify.toml config
Currently the packages/start-netlify adapter doesn't allow for additional redirects in the same site deploy.
If a site uses the netlify email plugin or functions, the path is redirected to the app routes only. The developer should be able to add those redirect paths prior to the app overwrite paths at root.
Example _redirects (published)
/.functions/email/* /api/:splat 200!
/* /.netlify/functions/index 200
An initial solution could just be as simple as allowing a _redirects file at the root of the repository to be copied to the deploy/distribution folder. Also a check for redirects in a netlify.toml would allow for the ability to create headers for proxy redirects. If the netlify.toml file exists, skip the _redirects write and make sure there is a proxy rewrite for the app equivalent.