https://github.com/ivan-corporation/react-compress
This compress library was made with Brotli, Gzip and compress-create-react-app help, for React users who want to make website more performance and reduce JS bundle code 🧽
https://github.com/ivan-corporation/react-compress
brotli javascript nodejs react react-compress
Last synced: about 1 month ago
JSON representation
This compress library was made with Brotli, Gzip and compress-create-react-app help, for React users who want to make website more performance and reduce JS bundle code 🧽
- Host: GitHub
- URL: https://github.com/ivan-corporation/react-compress
- Owner: Ivan-Corporation
- License: mit
- Created: 2022-02-13T05:55:21.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-07-23T07:26:05.000Z (about 3 years ago)
- Last Synced: 2025-05-03T17:43:47.206Z (5 months ago)
- Topics: brotli, javascript, nodejs, react, react-compress
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/react-compress
- Size: 119 KB
- Stars: 30
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://www.npmjs.com/package/react-compress)
[](https://standardjs.com)


# React-compress
### This compress library was made with Brotli and Gzip help, for React users who want to make website more performance and reduce JS bundle code without problems like this:
# Usage
Install library into your project `(with npm or yarn)`, how `dev`:
```bash
npm i react-compress --save-dev
---
yarn add react-compress -D
```And then just add react compress in your `package.json` build script like below:
```diff
- "build": "react-scripts build",
+ "build": "react-scripts build && react-compress",
```
And then just `run script build` like you always do:```bash
npm run build
---
yarn run build
```# Example
## `Before react-compress:`---
## `Build script with this library:`---
## `After react-compress:`# Summary
You can made your build folder `30% smaller` and optimized than it was without this library. How you can see in Example pictures our JS bundle who loaded 0.39s without this library now loaded in 0.2s, it's `almost 50%!`.And of course when your project larger this library will give you more profit
If you have some problems, write me, or use issues in this repository
## `Good luck!`