Skip to content

Commit e375f6e

Browse files
authored
feat: significantly reduce payload install size by removing unnecessary monaco-editor dependency (#7939)
This reduces the total install size of `payload` from 115 MB to 34 MB. We never used monaco-editor within payload - we were only using `@monaco-editor/react` which is a lot smaller. Since we expose its types to the end user, we have to add it to our `dependencies`, not `devDependencies`. Before: https://npmgraph.js.org/[email protected]#select=exact%3Apayload%403.0.0-canary.1a675ae&zoom=w After: https://npmgraph.js.org/?q=payload%403.0.0-canary.cdb9474#zoom=h&select=exact%3Apayload%403.0.0-canary.cdb9474
1 parent cc9b877 commit e375f6e

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

packages/payload/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
"pretest": "pnpm build"
8585
},
8686
"dependencies": {
87+
"@monaco-editor/react": "4.6.0",
8788
"@next/env": "^15.0.0-canary.104",
8889
"@payloadcms/translations": "workspace:*",
8990
"@types/busboy": "1.5.4",
@@ -101,7 +102,6 @@
101102
"json-schema-to-typescript": "15.0.1",
102103
"jsonwebtoken": "9.0.1",
103104
"minimist": "1.2.8",
104-
"monaco-editor": "0.38.0",
105105
"pino": "9.3.1",
106106
"pino-pretty": "11.2.1",
107107
"pluralize": "8.0.0",
@@ -113,7 +113,6 @@
113113
},
114114
"devDependencies": {
115115
"@hyrious/esbuild-plugin-commonjs": "^0.2.4",
116-
"@monaco-editor/react": "4.5.1",
117116
"@payloadcms/eslint-config": "workspace:*",
118117
"@types/json-schema": "7.0.15",
119118
"@types/jsonwebtoken": "8.5.9",

packages/ui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"@faceless-ui/modal": "3.0.0-beta.2",
7878
"@faceless-ui/scroll-info": "2.0.0-beta.0",
7979
"@faceless-ui/window-info": "3.0.0-beta.0",
80-
"@monaco-editor/react": "4.5.1",
80+
"@monaco-editor/react": "4.6.0",
8181
"@payloadcms/translations": "workspace:*",
8282
"body-scroll-lock": "4.0.0-beta.0",
8383
"bson-objectid": "2.0.4",

pnpm-lock.yaml

+8-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)