Skip to content

Commit ffef96a

Browse files
Fix MUI 7 esm support (#4639)
With MUI 7 having full ESM support, our `tsc-alias` replacer support is no longer needed - Updated `.gitIgnore` to globalize the `*Replacer.js` and `*Replace.cjs` names - Deleted the `muiReplacer.ts` file as it is no longer needed - In `@rjsf/mui`, removed the `tsc-alias` replacer support as follows: - Deleted the `tsconfig.replacer.json` - Updated the `package.json` to remove the `compileReplacer` script and updated the `build:ts` script not to use it - Updated the `tsconfig.build.json` to remove the `muiReplacer` reference - Updated the `CHANGELOG.md` accordingly
1 parent e235f0b commit ffef96a

File tree

6 files changed

+10
-45
lines changed

6 files changed

+10
-45
lines changed

.gitignore

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,8 @@ out/
140140

141141
# typescript tsbuildinfo
142142
*.tsbuildinfo
143-
lodashReplacer.js
144-
lodashReplacer.cjs
145-
muiReplacer.js
146-
muiReplacer.cjs
147-
ajvReplacer.js
148-
ajvReplacer.cjs
143+
*Replacer.js
144+
*Replacer.cjs
149145

150146
# Need this due to shadcn default utils folder is lib
151147
!packages/shadcn/src/lib

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ should change the heading of the (upcoming) version to include a major version b
1616
1717
-->
1818

19+
# 6.0.0-beta.10
20+
21+
## @rjsf/mui
22+
23+
- Fixed build process to remove the `tsc-alias` replacer that was adding `/index.js` onto the `@mui/Xxxx` imports since MUI 7 has proper ESM support
24+
1925
# 6.0.0-beta.9
2026

2127
## @rjsf/antd

packages/mui/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@
3939
"src"
4040
],
4141
"scripts": {
42-
"compileReplacer": "tsc -p tsconfig.replacer.json && move-file muiReplacer.js muiReplacer.cjs",
43-
"build:ts": "npm run compileReplacer && rimraf ./lib && tsc -b tsconfig.build.json && tsc-alias -p tsconfig.build.json",
42+
"build:ts": "rimraf ./lib && tsc -b tsconfig.build.json && tsc-alias -p tsconfig.build.json",
4443
"build:cjs": "esbuild ./src/index.ts --bundle --outfile=dist/index.js --sourcemap --packages=external --format=cjs",
4544
"build:esm": "esbuild ./src/index.ts --bundle --outfile=dist/mui.esm.js --sourcemap --packages=external --format=esm",
4645
"build:umd": "rollup dist/mui.esm.js --format=umd --file=dist/mui.umd.js --name=@rjsf/mui",

packages/mui/tsconfig.build.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@
1111
],
1212
"tsc-alias": {
1313
"resolveFullPaths": true,
14-
"verbose": true,
15-
"replacers": {
16-
"lodash": {
17-
"enabled": true,
18-
"file": "muiReplacer.cjs"
19-
}
20-
}
14+
"verbose": true
2115
}
2216
}

packages/mui/tsconfig.replacer.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

tsc-alias-replacer/muiReplacer.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)