@tsrx/preact 0.2.8 → 0.3.0
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 +3 -3
- package/src/transform.js +4 -0
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.
|
|
6
|
+
"version": "0.3.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "public"
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"esrap": "^2.3.2",
|
|
39
39
|
"zimmerframe": "^1.1.2",
|
|
40
|
-
"@tsrx/core": "0.
|
|
41
|
-
"@tsrx/preact-runtime": "0.1.
|
|
40
|
+
"@tsrx/core": "0.5.0",
|
|
41
|
+
"@tsrx/preact-runtime": "0.1.12"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"preact": ">=10"
|
package/src/transform.js
CHANGED
|
@@ -45,6 +45,10 @@ const preact_platform = {
|
|
|
45
45
|
rewriteClassAttr: false,
|
|
46
46
|
multiRefStrategy: 'merge-refs',
|
|
47
47
|
hostSpreadRefBinding: 'in-place',
|
|
48
|
+
// preact-render-to-string escapes a string child of `<script>` like
|
|
49
|
+
// text; `dangerouslySetInnerHTML` renders the body as written on the
|
|
50
|
+
// client and the server.
|
|
51
|
+
scriptBody: 'dangerouslySetInnerHTML',
|
|
48
52
|
},
|
|
49
53
|
validation: {
|
|
50
54
|
requireUseServerForAwait: false,
|