In projects where material-ui is used I suggest to avoid bulk named imports in manner:
import { Button, Grid } from '@material-ui/core';
This is because NodeJS parses all imports in index.ts on '@material-ui/core' before return the needed component or functionality, on projects with Material-UI this behavior is unacceptable due to the overhead on compile and test times.
Solution
Instead of bulk named imports the best option is to import components one by one to theirs component index file directly, ex:
import Button from '@material-ui/core/Button';
import Grid from '@material-ui/core/Grid';
By doing this the tests can be executed in 0-5 minutes, before, with the first approach the test could last more than 10 minutes (in lower specs machines).
Problem
In projects where material-ui is used I suggest to avoid bulk named imports in manner:
This is because NodeJS parses all imports in index.ts on '@material-ui/core' before return the needed component or functionality, on projects with Material-UI this behavior is unacceptable due to the overhead on compile and test times.
Solution
Instead of bulk named imports the best option is to import components one by one to theirs component index file directly, ex:
By doing this the tests can be executed in 0-5 minutes, before, with the first approach the test could last more than 10 minutes (in lower specs machines).