packages/cli: disallow importing all of @material-ui/icons

This commit is contained in:
Patrik Oldsberg
2020-05-16 16:21:00 +02:00
parent f4f687019b
commit 91c395830d
4 changed files with 32 additions and 19 deletions
+13
View File
@@ -57,6 +57,19 @@ module.exports = {
'warn',
{ vars: 'all', args: 'after-used', ignoreRestSiblings: true },
],
// Importing the entire MUI icons packages kills build performance as the list of icons is huge.
'no-restricted-imports': [
2,
{
paths: [
{
name: '@material-ui/icons',
message: "Please import '@material-ui/icons/<Icon>' instead.",
},
],
},
],
},
overrides: [
{