Code Monkey home page Code Monkey logo

react-compress's Introduction

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!

react-compress's People

Contributors

ivan-corporation avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.