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' ;
21import type { EditorColors , Highlighter , LineDiffAlgorithm } from '@mismerge/core' ;
32import { useEffect , useRef } from 'react' ;
43
@@ -41,6 +40,11 @@ export function MisMerge2({
4140} ) {
4241 const ref = useRef < JSX . IntrinsicElements [ 'mis-merge2' ] > ( null ) ;
4342
43+ useEffect ( ( ) => {
44+ // @ts -expect-error No definitions provided for web components
45+ import ( '@mismerge/core/web' ) ;
46+ } , [ ] ) ;
47+
4448 useEffect ( ( ) => {
4549 if ( ref . current ) {
4650 ref . current . highlight = highlight ;
Original file line number Diff line number Diff line change 1- import '@mismerge/core/web' ;
21import type { EditorColors , Highlighter , LineDiffAlgorithm } from '@mismerge/core' ;
32import { useEffect , useRef } from 'react' ;
43
@@ -49,6 +48,11 @@ export function MisMerge3({
4948} ) {
5049 const ref = useRef < JSX . IntrinsicElements [ 'mis-merge2' ] > ( null ) ;
5150
51+ useEffect ( ( ) => {
52+ // @ts -expect-error No definitions provided for web components
53+ import ( '@mismerge/core/web' ) ;
54+ } , [ ] ) ;
55+
5256 useEffect ( ( ) => {
5357 if ( ref . current ) {
5458 ref . current . highlight = highlight ;
You can’t perform that action at this time.
0 commit comments