-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTML output support writing to /ROUTE instead of /ROUTE/index.html #493
Comments
I'm having a similar situation here. For me I would like to generate Maybe there can be a separated option to specify extension for output files? |
Yeah being able to configure the html output name makes sense. I also realized this solution does not make sense for nested paths, because a file can't also be a directory e.g.
I'll alter my PR to allow for configuring the output HTML file name. I do think the only solution for hosting via S3 + AWS Cloudfront is to use Lambda@Edge scripts to rewrite the requests to serve |
This will help with my scenario: static s3 bucket behind cloudfront. I will try the natahouse fork until it's a vanilla feature edlt: that helped, but I don't want the .html suffix at all. I will try renaming after react-snap has finished |
Feature Request
Is your feature request related to a problem? Please describe.
I want to use react-snap with S3 + CloudFront, but it's problematic to have to setup rules for serving
/ROUTE/index.html
routes when a user requests just/ROUTE
(from what I can tell it requires creating a Lambda@Edge script that runs on every request https://aws.amazon.com/blogs/compute/implementing-default-directory-indexes-in-amazon-s3-backed-amazon-cloudfront-origins-using-lambdaedge/)Describe the solution you'd like
Ideally
react-snap
could just generate HTML output as the name of the route e.g./ROUTE
would just generate in output directorybuild/
build/ROUTE
as the HTML.Describe alternatives you've considered
I could write a postbuild script that then converts the
ROUTE/index.html to just
ROUTE, but I'd rather there be a configuration option in
react-snap` to do that.Teachability, Documentation, Adoption, Migration Strategy
If you can, explain how users will be able to use this and possibly write out a version the docs.
To output HTML to the route you want just configure
saveAsIndeHtml: false
inreact-snap
in yourpackage.json
config.The text was updated successfully, but these errors were encountered: