Skip to content

Commit 1861ec4

Browse files
enhance tsup
Signed-off-by: Rajesh-Nagarajan-11 <rajeshnagarajan36@gmail.com>
1 parent 8e45140 commit 1861ec4

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/custom/Stepper/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Box, Stack, Step, StepConnector, StepLabel, Stepper } from '@mui/material';
22
import { stepConnectorClasses } from '@mui/material/StepConnector';
33
import { StepIconProps } from '@mui/material/StepIcon';
4-
import { styled } from '@mui/system';
4+
import { styled } from '@mui/material/styles';
55
import React, { useMemo, useState } from 'react';
66
import { IconProps } from '../../icons/types';
77
import { useTheme } from '../../theme';

tsup.config.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@ const env = process.env.NODE_ENV;
66

77
// All deps and peerDeps must stay external — re-bundling packages like
88
// MUI / emotion breaks CJS ↔ ESM default-export interop at runtime.
9-
const external = [
9+
const external: (string | RegExp)[] = [
1010
...Object.keys(pkg.dependencies ?? {}),
11-
...Object.keys(pkg.peerDependencies ?? {})
11+
...Object.keys(pkg.peerDependencies ?? {}),
12+
// Safety-net: catch transitive @mui/* and @emotion/* sub-packages that
13+
// aren't explicitly listed in dependencies (e.g. @mui/system,
14+
// @mui/styled-engine, @mui/utils) so they never get re-bundled.
15+
/^@mui\//,
16+
/^@emotion\//
1217
];
1318

1419
export default defineConfig({

0 commit comments

Comments
 (0)