Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

chore: bump sirv-cli #135

Merged
merged 1 commit into from
Jul 24, 2020
Merged

chore: bump sirv-cli #135

merged 1 commit into from
Jul 24, 2020

Conversation

lukeed
Copy link
Member

@lukeed lukeed commented Jun 10, 2020

Maybe a WIP PR – I think with the changes in 1.0, it might be time to enable --single by default again since missing assets will 404 correctly now (#116)

Might also want to include a HTTPS or HTTP/2 step-by-step here (#128)?

@Conduitry
Copy link
Member

Any asset requests (URLs that end with an extension) ignore --single behavior and will send a 404 response instead of the "index.html" fallback.

Hm. That's an interesting new default behavior for SPA mode. That'll probably work most of the time, but I'm still worried that using that as the default will lead to even more confusion than there is now when it doesn't do quite the right thing. We have plenty of evidence that people won't read sirv's docs before asking questions about how to do things with this template. I don't know what the right answer is here.

@lukeed
Copy link
Member Author

lukeed commented Jun 11, 2020

Yeah, we dont have to do anything, but the current --single behavior is the correct default behavior it should have always had. It's not a surprise at all that the previous --single attempt(s) always caused a boat load of confusion.

@Conduitry
Copy link
Member

The new --single behavior will give people problems if they try to have an SPA where some of the routes have a period in them though, right? I don't know how common that would be. Is there some precedent in other tools about how to handle this and try to make only the intended 404s be 404s?

@lukeed
Copy link
Member Author

lukeed commented Jun 11, 2020

Yeah, they look for "." in the address bar. The only other way to approach it is to send a (long) default list of file extensions, which will undoubtedly need modifying anyway.

You can disable all the default "ignore" behavior by --no-ignores or add new patterns to ignore by passing it in: --ignore foobar

@lukeed
Copy link
Member Author

lukeed commented Jun 20, 2020

Can we revisit this? Some people are running into issues getting old sirv & expecting new behavior: lukeed/sirv#67 (comment)

@lukeed
Copy link
Member Author

lukeed commented Jul 24, 2020

Merging this as I still get pings about sirv issues/questions – usually along the lines of "sirv documentation doesn't match its behavior [...] oh! the template didn't give me the latest"

We can adjust flags/documentation later as needed

@lukeed lukeed merged commit 16e4763 into master Jul 24, 2020
@lukeed lukeed deleted the bump/sirv branch July 24, 2020 17:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants