diff --git a/.changeset/early-monkeys-drive.md b/.changeset/early-monkeys-drive.md new file mode 100644 index 0000000000..ffb7157d27 --- /dev/null +++ b/.changeset/early-monkeys-drive.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-rollbar': patch +--- + +Adjusted MUI imports for better tree shaking. diff --git a/plugins/rollbar/.eslintrc.js b/plugins/rollbar/.eslintrc.js index e2a53a6ad2..e487f765b2 100644 --- a/plugins/rollbar/.eslintrc.js +++ b/plugins/rollbar/.eslintrc.js @@ -1 +1,5 @@ -module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, { + rules: { + '@backstage/no-top-level-material-ui-4-imports': 'error', + }, +}); diff --git a/plugins/rollbar/src/components/RollbarTopItemsTable/RollbarTopItemsTable.tsx b/plugins/rollbar/src/components/RollbarTopItemsTable/RollbarTopItemsTable.tsx index 89fa7596b0..c6eb8888ab 100644 --- a/plugins/rollbar/src/components/RollbarTopItemsTable/RollbarTopItemsTable.tsx +++ b/plugins/rollbar/src/components/RollbarTopItemsTable/RollbarTopItemsTable.tsx @@ -14,8 +14,9 @@ * limitations under the License. */ -import { Box, Typography } from '@material-ui/core'; -import { Alert } from '@material-ui/lab'; +import Box from '@material-ui/core/Box'; +import Typography from '@material-ui/core/Typography'; +import Alert from '@material-ui/lab/Alert'; import React from 'react'; import { RollbarFrameworkId,