Precompress and optimize static files during build and serve them to browsers#1030
Closed
gmokki wants to merge 1 commit intoHSLdevcom:masterfrom
Closed
Precompress and optimize static files during build and serve them to browsers#1030gmokki wants to merge 1 commit intoHSLdevcom:masterfrom
gmokki wants to merge 1 commit intoHSLdevcom:masterfrom
Conversation
Contributor
|
Is there some reason not to use a ready-made plugin like https://webpack.js.org/plugins/compression-webpack-plugin/ for the compression of the assets? |
Author
|
Only familiarity of basic unix tools. I can try to use webpack plugins:
Or maybe I will just leave the image optimizations out of this PR... |
Contributor
|
I think the imagemin-zopfli plugin can be added using this |
Contributor
|
Also check #1031 where we have included the svgs to be bundled using webpack. |
737e59d to
6d55853
Compare
…the browsers. - create precompressed variants of js, css, svg files: gz using zopfli and br using brotli Currently using forked versions of expressjs/send/negotiator while waiting for the PRs to go through: - jshttp/negotiator#49 - pillarjs/send#108
6d55853 to
9ea280e
Compare
Contributor
|
Implemented the serving using a different express middleware, so we can use the vanilla express version. See cc2c7f0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The PR is done - it:
npm run lint)npm run test-localandnpm run test-browserstack)Changes:
Currently using forked versions of expressjs/send/negotiator while waiting for the PRs to go through: