Skip to content

Add redirects to onPreDev #1633

@sarahetter

Description

@sarahetter

When adding

[dev]
framework = "#static"

to the netlify.toml, ntl dev starts a static http server, serving files from the publish directory. This more closely mirrors what's happening with the app when it runs on Netlify.

However, right now ntl dev fails and only displays "Not Found" on the page, as we haven't generated and added redirects to the netlify.toml file, as we're doing when actually building. We need to add these redirects in the onPreDev step to allow ntl dev to function properly in this case.

This is also blocking #1553

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions