Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to install a package that contains only one component of Material-UI?

Material-UI is a very big package and I only want to use one component of it.

Is there a way to install a package that only contains the component I want to use?

e.g.

use

import Button from '@material-ui/core/Button';

But only have in your package.json something like @material-ui/core/Button.

The reason I want this is to have a small node_modules.

like image 434
Vencovsky Avatar asked Dec 24 '19 12:12

Vencovsky


2 Answers

you can install each component of Material-UI via bit.dev collection:
https://bit.dev/mui-org/material-ui
Here is the Button component for example:
https://bit.dev/mui-org/material-ui/button

I exported the project to bit.dev and I'm trying to keep it up to date as much as possible.

like image 124
Josh Avatar answered Oct 14 '22 23:10

Josh


You can install and use the isolated material components here: bit.dev

like image 22
Ali Torki Avatar answered Oct 15 '22 01:10

Ali Torki