diff --git a/.changeset/gorgeous-eels-cheat.md b/.changeset/gorgeous-eels-cheat.md new file mode 100644 index 0000000000..03f469bef3 --- /dev/null +++ b/.changeset/gorgeous-eels-cheat.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-dynatrace': patch +--- + +Adjusted MUI imports for better tree shaking diff --git a/plugins/dynatrace/.eslintrc.js b/plugins/dynatrace/.eslintrc.js index e2a53a6ad2..e487f765b2 100644 --- a/plugins/dynatrace/.eslintrc.js +++ b/plugins/dynatrace/.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/dynatrace/src/components/DynatraceTab/DynatraceTab.tsx b/plugins/dynatrace/src/components/DynatraceTab/DynatraceTab.tsx index 16d9d47545..d77a32b668 100644 --- a/plugins/dynatrace/src/components/DynatraceTab/DynatraceTab.tsx +++ b/plugins/dynatrace/src/components/DynatraceTab/DynatraceTab.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ import React from 'react'; -import { Grid } from '@material-ui/core'; +import Grid from '@material-ui/core/Grid'; import { Page, Content } from '@backstage/core-components'; import { useEntity, diff --git a/plugins/dynatrace/src/components/Synthetics/SyntheticsLocation/SyntheticsLocation.tsx b/plugins/dynatrace/src/components/Synthetics/SyntheticsLocation/SyntheticsLocation.tsx index 4d328210cb..336baec4e8 100644 --- a/plugins/dynatrace/src/components/Synthetics/SyntheticsLocation/SyntheticsLocation.tsx +++ b/plugins/dynatrace/src/components/Synthetics/SyntheticsLocation/SyntheticsLocation.tsx @@ -18,7 +18,7 @@ import React from 'react'; import useAsync from 'react-use/lib/useAsync'; import { Progress, ResponseErrorPanel } from '@backstage/core-components'; import { useApi } from '@backstage/core-plugin-api'; -import { Chip } from '@material-ui/core'; +import Chip from '@material-ui/core/Chip'; import { dynatraceApiRef } from '../../../api'; type SyntheticsLocationProps = {