Socket
Socket
Sign inDemoInstall

react-compress

Package Overview
Dependencies
17
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-compress

Easy way to compress your JS bundle when you compile build folder


Version published
Weekly downloads
230
decreased by-13.86%
Maintainers
1
Install size
646 kB
Created
Weekly downloads
 

Readme

Source

NPM JavaScript Style Guide NPM npm GitHub stars

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:

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:

-   "build": "react-scripts build",
+   "build": "react-scripts build && react-compress",

And then just run script build like you always do:

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!

Keywords

FAQs

Last updated on 23 Jul 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc