Skip to content

Commit 0b18d76

Browse files
authored
fix: Fix errors that cant' find default export in cjs (#168)
1 parent 8f62326 commit 0b18d76

File tree

5 files changed

+4
-6
lines changed

5 files changed

+4
-6
lines changed

packages/@react-editor-js/client/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"main": "./dist/client.cjs.js",
66
"module": "./dist/client.js",
77
"types": "./dist/client/src/index.d.ts",
8-
"author": "Jungwoo An <o1o9814@naver.com>",
98
"repository": {
109
"type": "git",
1110
"url": "https://github.com/Jungwoo-An/react-editor-js.git"

packages/@react-editor-js/core/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"main": "./dist/core.cjs.js",
66
"module": "./dist/core.js",
77
"types": "./dist/core/src/index.d.ts",
8-
"author": "Jungwoo An <o1o9814@naver.com>",
98
"repository": {
109
"type": "git",
1110
"url": "https://github.com/Jungwoo-An/react-editor-js.git"

packages/@react-editor-js/server/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"main": "./dist/server.cjs.js",
66
"module": "./dist/server.js",
77
"types": "./dist/server/src/index.d.ts",
8-
"author": "Jungwoo An <o1o9814@naver.com>",
98
"repository": {
109
"type": "git",
1110
"url": "https://github.com/Jungwoo-An/react-editor-js.git"

packages/react-editor-js/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"main": "./dist/react-editor-js.cjs.js",
66
"module": "./dist/react-editor-js.js",
77
"types": "./dist/react-editor-js/src/index.d.ts",
8-
"author": "Jungwoo An <o1o9814@naver.com>",
98
"repository": {
109
"type": "git",
1110
"url": "https://github.com/Jungwoo-An/react-editor-js.git"
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
export function createReactEditorJS() {
22
if (typeof window !== 'undefined') {
3-
return require('@react-editor-js/client')
3+
const Component = require('@react-editor-js/client')
4+
return Component.default || Component
45
} else {
5-
return require('@react-editor-js/server')
6+
const Component = require('@react-editor-js/server')
7+
return Component.default || Component
68
}
79
}

0 commit comments

Comments
 (0)