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
Support compressed assets #46
Conversation
package.json
Outdated
"send": "^0.16.0" | ||
}, | ||
"devDependencies": { | ||
"coveralls": "^3.0.0", | ||
"fastify": "^1.1.1", | ||
"fastify-compress": "^0.5.1", | ||
"pre-commit": "^1.2.2", | ||
"proxyquire": "^2.0.0", | ||
"request": "2.83.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you can remove request
.
example/server-compress.js
Outdated
|
||
fastify | ||
// compress everything | ||
.register(require('fastify-compress'), { global: true, threshold: 0 }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need global: true
it's the default ;)
@delvedor done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty hacky, but I guess this is necessary so LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay.
Tricky implementation.
we need to have a tool to test those compatibilities.
As titled.
The implementation of this is very hacky, and it's needed as
send
does not play nice with fastify lifecycle. It also introduces some overhead.Fixes #45.