Skip to content

Commit fe8ec9e

Browse files
authored
[infra] Remove "main" fields from publishable packages (#46856)
1 parent 914152f commit fe8ec9e

File tree

14 files changed

+31
-27
lines changed

14 files changed

+31
-27
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
"@mui-internal/api-docs-builder-core": "workspace:^",
113113
"@mui/internal-babel-plugin-minify-errors": "^2.0.8-canary.7",
114114
"@mui/internal-bundle-size-checker": "^1.0.9-canary.36",
115-
"@mui/internal-code-infra": "^0.0.3-canary.0",
115+
"@mui/internal-code-infra": "^0.0.3-canary.1",
116116
"@mui/internal-docs-utils": "workspace:^",
117117
"@mui/internal-scripts": "workspace:^",
118118
"@mui/internal-test-utils": "workspace:^",

packages/mui-icons-material/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
"scripts": {
3030
"build": "shx cp -r lib/ build/ && pnpm build:copy-files && pnpm build:typings && pnpm build:esm-pkg",
3131
"build:esm-pkg": "node ./scripts/create-esm-package-json.mjs",
32-
"build:lib": "code-infra build --hasLargeFiles --skipPackageJson --skipBundlePackageJson --buildTypes false",
32+
"build:lib": "code-infra build --hasLargeFiles --skipPackageJson --skipBundlePackageJson --skipMainCheck --buildTypes false",
3333
"build:lib:clean": "rimraf lib && pnpm build:lib && shx cp -R build lib",
34-
"build:stable": "code-infra build --bundle esm --hasLargeFiles --skipPackageJson --buildTypes false --skipBundlePackageJson",
34+
"build:stable": "code-infra build --bundle esm --hasLargeFiles --skipPackageJson --buildTypes false --skipBundlePackageJson --skipMainCheck",
3535
"build:copy-files": "node ../../scripts/copyFiles.mjs",
3636
"build:typings": "node ./scripts/create-typings.mjs",
3737
"release": "pnpm build && pnpm publish",
@@ -82,23 +82,23 @@
8282
},
8383
"exports": {
8484
".": {
85-
"import": {
86-
"types": "./esm/index.d.ts",
87-
"default": "./esm/index.js"
88-
},
8985
"require": {
9086
"types": "./index.d.ts",
9187
"default": "./index.js"
88+
},
89+
"default": {
90+
"types": "./esm/index.d.ts",
91+
"default": "./esm/index.js"
9292
}
9393
},
9494
"./*": {
95-
"import": {
96-
"types": "./esm/*.d.ts",
97-
"default": "./esm/*.js"
98-
},
9995
"require": {
10096
"types": "./*.d.ts",
10197
"default": "./*.js"
98+
},
99+
"default": {
100+
"types": "./esm/*.d.ts",
101+
"default": "./esm/*.js"
102102
}
103103
},
104104
"./esm": null,

packages/mui-joy/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"version": "5.0.0-beta.49",
44
"private": true,
55
"description": "Joy UI is an open-source React component library that implements MUI's own design principles. It's comprehensive and can be used in production out of the box.",
6-
"main": "./src/index.ts",
76
"keywords": [
87
"react",
98
"react-component",
@@ -85,6 +84,7 @@
8584
"node": ">=14.0.0"
8685
},
8786
"exports": {
87+
".": "./src/index.ts",
8888
"./*": "./src/*/index.ts"
8989
}
9090
}

packages/mui-lab/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"version": "7.0.0-beta.17",
55
"author": "MUI Team",
66
"description": "Laboratory for new Material UI modules.",
7-
"main": "./src/index.js",
87
"keywords": [
98
"react",
109
"react-component",
@@ -88,6 +87,7 @@
8887
"node": ">=14.0.0"
8988
},
9089
"exports": {
90+
".": "./src/index.js",
9191
"./*": "./src/*/index.ts"
9292
}
9393
}

packages/mui-material-pigment-css/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"version": "7.3.2",
44
"author": "MUI Team",
55
"description": "A wrapper over Pigment CSS that provides the same styled and theming APIs as Material UI.",
6-
"main": "./src/index.ts",
76
"keywords": [
87
"react",
98
"mui",
@@ -63,6 +62,7 @@
6362
}
6463
},
6564
"exports": {
65+
".": "./src/index.ts",
6666
"./styles.css": "./src/styles.css",
6767
"./*": "./src/*/index.ts"
6868
},

packages/mui-material/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"version": "7.3.2",
44
"author": "MUI Team",
55
"description": "Material UI is an open-source React component library that implements Google's Material Design. It's comprehensive and can be used in production out of the box.",
6-
"main": "./src/index.ts",
76
"keywords": [
87
"react",
98
"react-component",
@@ -99,6 +98,7 @@
9998
"node": ">=14.0.0"
10099
},
101100
"exports": {
101+
".": "./src/index.js",
102102
"./ButtonBase/TouchRipple": "./src/ButtonBase/TouchRipple.js",
103103
"./*": "./src/*/index.ts"
104104
},

packages/mui-private-theming/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"version": "7.3.2",
44
"author": "MUI Team",
55
"description": "Private - The React theme context to be shared between `@mui/styles` and `@mui/material`.",
6-
"main": "./src/index.js",
76
"keywords": [
87
"react",
98
"react-component",
@@ -63,6 +62,7 @@
6362
"node": ">=14.0.0"
6463
},
6564
"exports": {
65+
".": "./src/index.js",
6666
"./*": "./src/*/index.js"
6767
}
6868
}

packages/mui-styled-engine-sc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"version": "7.3.2",
44
"author": "MUI Team",
55
"description": "styled() API wrapper package for styled-components.",
6-
"main": "./src/index.js",
76
"keywords": [
87
"react",
98
"react-component",
@@ -59,6 +58,7 @@
5958
"node": ">=14.0.0"
6059
},
6160
"exports": {
61+
".": "./src/index.js",
6262
"./*": "./src/*/index.js"
6363
}
6464
}

packages/mui-styled-engine/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"version": "7.3.2",
44
"author": "MUI Team",
55
"description": "styled() API wrapper package for emotion.",
6-
"main": "./src/index.js",
76
"keywords": [
87
"react",
98
"react-component",
@@ -73,6 +72,7 @@
7372
"node": ">=14.0.0"
7473
},
7574
"exports": {
75+
".": "./src/index.js",
7676
"./*": "./src/*/index.js"
7777
}
7878
}

packages/mui-stylis-plugin-rtl/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"version": "7.3.2",
44
"author": "MUI Team",
55
"description": "A plugin for Material UI that provides RTL (right-to-left) support.",
6-
"main": "./src/index.ts",
76
"keywords": [
87
"react",
98
"react-component",
@@ -58,5 +57,8 @@
5857
},
5958
"engines": {
6059
"node": ">=14.0.0"
60+
},
61+
"exports": {
62+
".": "./src/index.ts"
6163
}
6264
}

0 commit comments

Comments
 (0)