-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Describe the problem
In #2632 we added the prerender.createIndexFiles option, and I'm pretty sure it was a mistake. On most platforms you shouldn't be touching it at all. The only time the user should be configuring it is when they're targeting a static file host (i.e. they're using adapter-static) and the index files are problematic for some reason (e.g. they cause the host to redirect /foo to /foo/, breaking relative URLs).
There may be situations where an adapter needs to set this option, with knowledge of how it will interact with the platform (e.g. Netlify's default is to map about.html to /about and about/index.html to /about/ — I think we're probably getting this wrong at the moment).
Describe the proposed solution
Remove prerender.createIndexFiles in favour of making it part of the adapter API...
const prerendered = await builder.prerender({
all: false,
dest,
index: false
});...and exposing it via the adapter-static options.
Alternatives considered
No response
Importance
nice to have
Additional Information
No response