Skip to content
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

Update documentation, add file compression #3632

Closed
wants to merge 1 commit into from

Conversation

dbertella
Copy link

As proposed in #1908 and #3169 gzip file can be just a postbuild script in the package.json, here is a simple example in the README.md file

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

Copy link
Contributor

@Timer Timer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR! What's the story for Windows compatibility? Is there an npm package we can use instead?

@gaearon
Copy link
Contributor

gaearon commented Jan 9, 2018

Typically web server takes care of this. Do we really need it?

@Timer
Copy link
Contributor

Timer commented Jan 9, 2018

Probably not.

@gaearon
Copy link
Contributor

gaearon commented Jan 9, 2018

I'd say let's leave it to web servers.

@gaearon gaearon closed this Jan 9, 2018
@yairEO
Copy link

yairEO commented Oct 9, 2018

While web servers do this, I would like to say that I currently am working on a simple dashboard for a client, and the client demanded the code to be serve statically (via S3 bucket).

After I've tried my best to convince the client to at least set up a simple server, the client agreed and is using serve

This simply "server" apparently doesn't know how to gzip on-the-fly.
If such case, it would be nice if the build process would have an optional extra step to gzip the assets and that probably means to replace automatically the reference to the assets within the index.html to use the .gz extension.

Since reate-react-app is in charge of injecting the javascript file reference into index.html and since nobody likes to eject, it would seem like a built-in build step should be added for the case I've described.

@lock lock bot locked and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants