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

Support compressed assets #46

Merged
merged 3 commits into from Apr 10, 2018
Merged

Support compressed assets #46

merged 3 commits into from Apr 10, 2018

Conversation

mcollina
Copy link
Member

@mcollina mcollina commented Apr 10, 2018

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.

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",
Copy link
Member

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.


fastify
// compress everything
.register(require('fastify-compress'), { global: true, threshold: 0 })
Copy link
Member

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 ;)

@mcollina
Copy link
Member Author

@delvedor done.

Copy link
Member

@delvedor delvedor left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@jsumners jsumners left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@nwoltman nwoltman left a 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

@mcollina mcollina merged commit aeffe6f into master Apr 10, 2018
@mcollina mcollina deleted the support-compress branch April 10, 2018 17:01
Copy link
Member

@allevo allevo left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants