You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename `future.unstable_trailingSlashAwareDataRequests` -> `future.trailingSlashAware` and update pre-rendering to be more flexible with trailing slashes.
7
+
8
+
Previously, pre-rendering coerced a trailing slash onto all paths, and always rendered `index.html` files in directory for the path:
Currently, the `getStaticPaths()` function available in the `prerender` function signature always returns paths without a trailing slash. We have also introduced a new option to that method allowing you to specify whether you want the static paths to reflect a trailing slash or not:
25
+
26
+
```ts
27
+
// Previously - no trailing slash
28
+
getStaticPaths(); // ["/", "/path", ...]
29
+
30
+
// future.unstable_trailingSlashAware = false (defaults to no trailing slash)
It will depend on what you are using to serve your pre-rendered pages, but generally we recommend the `both` behavior because that seems to play nicest across various different ways of serving static HTML files:
44
+
45
+
- Current:
46
+
-`prerender: ['/', '/page']` and `prerender: ['/', '/page/']`
0 commit comments