File tree Expand file tree Collapse file tree 6 files changed +68
-8
lines changed Expand file tree Collapse file tree 6 files changed +68
-8
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,11 @@ import { defineConfig } from "vite";
4
4
import pkg from "./package.json" ;
5
5
// import eslintPlugin from "vite-plugin-eslint";
6
6
7
- const deps = Object . keys ( pkg . dependencies ) ;
7
+ const deps = Object . keys ( {
8
+ ...pkg . dependencies ,
9
+ ...pkg . peerDependencies ,
10
+ ...pkg . devDependencies ,
11
+ } ) ;
8
12
9
13
// https://vitejs.dev/config/
10
14
export default defineConfig ( ( conf ) => ( {
@@ -37,7 +41,16 @@ export default defineConfig((conf) => ({
37
41
if ( deps . includes ( source ) ) {
38
42
return true ;
39
43
}
40
- return source . startsWith ( "prosemirror-" ) ;
44
+
45
+ if ( source === "react/jsx-runtime" ) {
46
+ return true ;
47
+ }
48
+
49
+ if ( source . startsWith ( "prosemirror-" ) ) {
50
+ return true ;
51
+ }
52
+
53
+ return false ;
41
54
} ,
42
55
output : {
43
56
// Provide global variables to use in the UMD build
Original file line number Diff line number Diff line change 67
67
"vitest" : " ^2.0.3" ,
68
68
"xml-formatter" : " ^3.6.3"
69
69
},
70
+ "peerDependencies" : {
71
+ "react" : " ^18.0 || ^19.0 || >= 19.0.0-rc" ,
72
+ "react-dom" : " ^18.0 || ^19.0 || >= 19.0.0-rc"
73
+ },
70
74
"eslintConfig" : {
71
75
"extends" : [
72
76
" ../../.eslintrc.js"
Original file line number Diff line number Diff line change @@ -4,7 +4,11 @@ import { defineConfig } from "vite";
4
4
import pkg from "./package.json" ;
5
5
// import eslintPlugin from "vite-plugin-eslint";
6
6
7
- const deps = Object . keys ( pkg . dependencies ) ;
7
+ const deps = Object . keys ( {
8
+ ...pkg . dependencies ,
9
+ ...pkg . peerDependencies ,
10
+ ...pkg . devDependencies ,
11
+ } ) ;
8
12
9
13
// https://vitejs.dev/config/
10
14
export default defineConfig ( ( conf ) => ( {
@@ -46,7 +50,16 @@ export default defineConfig((conf) => ({
46
50
if ( deps . includes ( source ) ) {
47
51
return true ;
48
52
}
49
- return source . startsWith ( "prosemirror-" ) ;
53
+
54
+ if ( source === "react/jsx-runtime" ) {
55
+ return true ;
56
+ }
57
+
58
+ if ( source . startsWith ( "prosemirror-" ) ) {
59
+ return true ;
60
+ }
61
+
62
+ return false ;
50
63
} ,
51
64
output : {
52
65
// Provide global variables to use in the UMD build
Original file line number Diff line number Diff line change 67
67
"vite-plugin-eslint" : " ^1.8.1" ,
68
68
"vitest" : " ^2.0.3"
69
69
},
70
+ "peerDependencies" : {
71
+ "react" : " ^18.0 || ^19.0 || >= 19.0.0-rc" ,
72
+ "react-dom" : " ^18.0 || ^19.0 || >= 19.0.0-rc"
73
+ },
70
74
"eslintConfig" : {
71
75
"extends" : [
72
76
" ../../.eslintrc.js"
Original file line number Diff line number Diff line change @@ -4,7 +4,11 @@ import { defineConfig } from "vite";
4
4
import pkg from "./package.json" ;
5
5
// import eslintPlugin from "vite-plugin-eslint";
6
6
7
- const deps = Object . keys ( pkg . dependencies ) ;
7
+ const deps = Object . keys ( {
8
+ ...pkg . dependencies ,
9
+ ...pkg . peerDependencies ,
10
+ ...pkg . devDependencies ,
11
+ } ) ;
8
12
9
13
// https://vitejs.dev/config/
10
14
export default defineConfig ( ( conf ) => ( {
@@ -36,7 +40,16 @@ export default defineConfig((conf) => ({
36
40
if ( deps . includes ( source ) ) {
37
41
return true ;
38
42
}
39
- return source . startsWith ( "prosemirror-" ) ;
43
+
44
+ if ( source === "react/jsx-runtime" ) {
45
+ return true ;
46
+ }
47
+
48
+ if ( source . startsWith ( "prosemirror-" ) ) {
49
+ return true ;
50
+ }
51
+
52
+ return false ;
40
53
} ,
41
54
output : {
42
55
// Provide global variables to use in the UMD build
Original file line number Diff line number Diff line change @@ -4,7 +4,11 @@ import { defineConfig } from "vite";
4
4
import pkg from "./package.json" ;
5
5
// import eslintPlugin from "vite-plugin-eslint";
6
6
7
- const deps = Object . keys ( pkg . dependencies ) ;
7
+ const deps = Object . keys ( {
8
+ ...pkg . dependencies ,
9
+ ...pkg . peerDependencies ,
10
+ ...pkg . devDependencies ,
11
+ } ) ;
8
12
9
13
// https://vitejs.dev/config/
10
14
export default defineConfig ( ( conf ) => ( {
@@ -53,7 +57,16 @@ export default defineConfig((conf) => ({
53
57
if ( deps . includes ( source ) ) {
54
58
return true ;
55
59
}
56
- return source . startsWith ( "prosemirror-" ) ;
60
+
61
+ if ( source === "react/jsx-runtime" ) {
62
+ return true ;
63
+ }
64
+
65
+ if ( source . startsWith ( "prosemirror-" ) ) {
66
+ return true ;
67
+ }
68
+
69
+ return false ;
57
70
} ,
58
71
output : {
59
72
// Provide global variables to use in the UMD build
You can’t perform that action at this time.
0 commit comments