Skip to content

Commit 33f3ee3

Browse files
committed
try different method of patching react
1 parent f320a44 commit 33f3ee3

File tree

5 files changed

+16
-14
lines changed

5 files changed

+16
-14
lines changed

src/js/bun.lockb

-119 Bytes
Binary file not shown.

src/js/package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@
1818
"@reactpy/client": "^0.3.2",
1919
"event-to-object": "^0.1.2",
2020
"morphdom": "^2.7.4",
21-
"preact": "^10.26.9"
22-
},
23-
"overrides": {
24-
"react": "npm:@preact/compat",
25-
"react-dom": "npm:@preact/compat"
21+
"preact": "^10.26.9",
22+
"react": "npm:@preact/compat@17.1.2",
23+
"react-dom": "npm:@preact/compat@17.1.2"
2624
}
2725
}

src/js/src/client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import {
22
BaseReactPyClient,
3-
ReactPyClient,
4-
ReactPyModule,
3+
type ReactPyClient,
4+
type ReactPyModule,
55
} from "@reactpy/client";
66
import { createReconnectingWebSocket } from "./utils";
7-
import { ReactPyDjangoClientProps, ReactPyUrls } from "./types";
7+
import type { ReactPyDjangoClientProps, ReactPyUrls } from "./types";
88

99
export class ReactPyDjangoClient
1010
extends BaseReactPyClient

src/js/src/components.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DjangoFormProps, HttpRequestProps } from "./types";
1+
import type { DjangoFormProps, HttpRequestProps } from "./types";
22
import { useEffect } from "preact/hooks";
33
import { render, createElement } from "preact";
44
/**

src/js/tsconfig.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"compilerOptions": {
3-
"allowJs": false,
3+
"allowImportingTsExtensions": true,
4+
"allowJs": true,
45
"allowSyntheticDefaultImports": true,
56
"declaration": true,
67
"declarationMap": true,
@@ -9,9 +10,11 @@
910
"isolatedModules": true,
1011
"jsx": "react-jsx",
1112
"jsxImportSource": "preact",
12-
"lib": ["DOM", "DOM.Iterable", "esnext"],
13-
"module": "esnext",
14-
"moduleResolution": "node",
13+
"lib": ["ESNext"],
14+
"module": "Preserve",
15+
"moduleDetection": "force",
16+
"moduleResolution": "bundler",
17+
"noEmit": true,
1518
"noEmitOnError": true,
1619
"noUnusedLocals": true,
1720
"paths": {
@@ -22,6 +25,7 @@
2225
"skipLibCheck": true,
2326
"sourceMap": true,
2427
"strict": true,
25-
"target": "esnext"
28+
"target": "ESNext",
29+
"verbatimModuleSyntax": true
2630
}
2731
}

0 commit comments

Comments
 (0)