playroom icon indicating copy to clipboard operation
playroom copied to clipboard

[Feature Request] Option to append index.html to routes

Open AndrewLeedham opened this issue 4 years ago • 4 comments

Some hosting environments like Chromatic don't automatically serve index.html from a folder path, e.g <base-url>/playroom/preview would just 404. I raised this issue with Chromatic and they are looking into it, but I thought it would also be useful to fix the problem here so other people can workaround it if their hosting cannot be modified.

I can see 3 paths for supporting this:

  • Updating all the links to include index.html, this could be a breaking change in some cases.
  • Adding an option to include index.html so it is opt-in.
  • Add a previewUrl option so the index.html can be added manually.

Personally I think option 2 makes the most-sense as it is opt-in and can apply to all URLs rather than having a separate option for any new links added in the future.

AndrewLeedham avatar Sep 23 '20 13:09 AndrewLeedham

I have the exact same issue with the CircleCI artifacts storage and would very much like to see this merged. Happy to help if help is needed.

roddds avatar Oct 14 '20 22:10 roddds

@roddds Not sure there is much you can do. I have put in a PR to fix the issue, just waiting on a PR review from a maintainer. I suppose you could test the implementation in your use-case and provide any feedback there?

AndrewLeedham avatar Oct 16 '20 11:10 AndrewLeedham

We're experiencing the same issue so would be great if the PR could be progressed.

TomHancock2 avatar Feb 15 '21 16:02 TomHancock2

If you're using Chromatic I worked with their devs and this is no-longer needed. But would still be useful for other platforms.

AndrewLeedham avatar Feb 15 '21 17:02 AndrewLeedham