File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
packages/adapter-react/src/lib Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
- import '@mismerge/core/web' ;
2
1
import type { EditorColors , Highlighter , LineDiffAlgorithm } from '@mismerge/core' ;
3
2
import { useEffect , useRef } from 'react' ;
4
3
@@ -41,6 +40,11 @@ export function MisMerge2({
41
40
} ) {
42
41
const ref = useRef < JSX . IntrinsicElements [ 'mis-merge2' ] > ( null ) ;
43
42
43
+ useEffect ( ( ) => {
44
+ // @ts -expect-error No definitions provided for web components
45
+ import ( '@mismerge/core/web' ) ;
46
+ } , [ ] ) ;
47
+
44
48
useEffect ( ( ) => {
45
49
if ( ref . current ) {
46
50
ref . current . highlight = highlight ;
Original file line number Diff line number Diff line change 1
- import '@mismerge/core/web' ;
2
1
import type { EditorColors , Highlighter , LineDiffAlgorithm } from '@mismerge/core' ;
3
2
import { useEffect , useRef } from 'react' ;
4
3
@@ -49,6 +48,11 @@ export function MisMerge3({
49
48
} ) {
50
49
const ref = useRef < JSX . IntrinsicElements [ 'mis-merge2' ] > ( null ) ;
51
50
51
+ useEffect ( ( ) => {
52
+ // @ts -expect-error No definitions provided for web components
53
+ import ( '@mismerge/core/web' ) ;
54
+ } , [ ] ) ;
55
+
52
56
useEffect ( ( ) => {
53
57
if ( ref . current ) {
54
58
ref . current . highlight = highlight ;
You can’t perform that action at this time.
0 commit comments