[breaking] remove createIndexFiles option, derive from trailingSlash instead#3801
[breaking] remove createIndexFiles option, derive from trailingSlash instead#3801Rich-Harris merged 12 commits intomasterfrom
createIndexFiles option, derive from trailingSlash instead#3801Conversation
🦋 Changeset detectedLatest commit: 1e2a61e The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
✔️ Deploy Preview for kit-demo canceled. 🔨 Explore the source changes: 1e2a61e 🔍 Inspect the deploy log: https://app.netlify.com/sites/kit-demo/deploys/6205694728e01d00087f8c8b |
|
This seems like a good idea to me. It'd be nice to do it automatically for |
|
Via https://www.zachleat.com/web/trailing-slash/, I found https://github.com/slorber/trailing-slash-guide. My takeaway is that we should indeed vary it based on I even wonder if it's worth exposing the option at all. I suspect there aren't really any cases where you'd need to control |
If you just drop the files in Apache or whatever you will need |
|
Is that true? If I create
|
|
Huh. TIL. I didn't think you could leave off the |
createIndexFiles option, derive from trailingSlash instead
|
lgtm after updating the validation message |
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>


createIndexFileshas been removed — it is now controlled by thetrailingSlashoption. See https://kit.svelte.dev/docs/configuration#trailingslash for more detailsOriginal PR message:
Fixes #3799.
One thing I've noticed about this option is that people (including myself) get confused talking about it because the default is
true, and it feels unusual to have to explicitly set an option tofalse. Two possible solutions:falsefalse, and makeabout/index.htmlinstead ofabout.htmlopt-inMight be worth doing a quick survey of popular static file hosts and seeing if
about.htmlwill work as expected in the majority of cases.Also, it might make sense to vary the default based on the value of
trailingSlashor the host being used, which we could do on a per-adapter basis, but not globally.Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpx changesetand following the prompts. All changesets should bepatchuntil SvelteKit 1.0