@tsrx/preact 0.1.16 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/index.js +1 -0
- package/src/transform.js +6 -4
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Preact compiler built on @tsrx/core",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Dominic Gannaway",
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.17",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "public"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"esrap": "^2.2.8",
|
|
36
36
|
"zimmerframe": "^1.1.2",
|
|
37
|
-
"@tsrx/core": "0.1.
|
|
37
|
+
"@tsrx/core": "0.1.17"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"preact": ">=10"
|
package/src/index.js
CHANGED
package/src/transform.js
CHANGED
|
@@ -24,8 +24,7 @@ export const DEFAULT_SUSPENSE_SOURCE = 'preact/compat';
|
|
|
24
24
|
* - `suspense` imports from `preact/compat` (overridable via `suspenseSource`).
|
|
25
25
|
* - `rewriteClassAttr: false` — Preact accepts `class` natively.
|
|
26
26
|
* - `acceptedTsxKinds` includes both `preact` and `react` for compat blocks.
|
|
27
|
-
* -
|
|
28
|
-
* requires a `"use server"` directive at module scope.
|
|
27
|
+
* - async function components are preserved as ordinary TypeScript functions.
|
|
29
28
|
*
|
|
30
29
|
* @type {JsxPlatform}
|
|
31
30
|
*/
|
|
@@ -43,10 +42,13 @@ const preact_platform = {
|
|
|
43
42
|
rewriteClassAttr: false,
|
|
44
43
|
acceptedTsxKinds: ['preact', 'react'],
|
|
45
44
|
multiRefStrategy: 'merge-refs',
|
|
46
|
-
htmlProp: 'dangerouslySetInnerHTML',
|
|
47
45
|
},
|
|
48
46
|
validation: {
|
|
49
|
-
requireUseServerForAwait:
|
|
47
|
+
requireUseServerForAwait: false,
|
|
48
|
+
},
|
|
49
|
+
hooks: {
|
|
50
|
+
moduleScopedHookComponents: true,
|
|
51
|
+
componentBodyHookHelpers: true,
|
|
50
52
|
},
|
|
51
53
|
};
|
|
52
54
|
|