Skip to content

Commit 22c9462

Browse files
Brian Kimbrainkim
Brian Kim
authored andcommitted
update astro plugin
1 parent 5c31edc commit 22c9462

File tree

3 files changed

+6
-28
lines changed

3 files changed

+6
-28
lines changed

packages/astro-crank/client.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ export default (rootEl) =>
99

1010
for (const [key, value] of Object.entries(slotted)) {
1111
props[key] = jsx`
12-
<${Raw} value=${value} $static />
13-
`;
12+
<${Raw} value=${value} copy=${true} />
13+
`;
1414
}
1515

1616
if (children != null) {
1717
children = jsx`
18-
<${Raw} value=${children} $static />
19-
`;
18+
<${Raw} value=${children} copy=${true} />
19+
`;
2020
}
2121

2222
if (client === "only") {

packages/astro-crank/index.js

-22
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,6 @@ export default function crankIntegration() {
88
clientEntrypoint: "astro-crank/client.js",
99
serverEntrypoint: "astro-crank/server.js",
1010
jsxImportSource: "@b9g/crank",
11-
jsxTransformOptions: async () => {
12-
const babelPluginReactJSX = await import(
13-
"@babel/plugin-transform-react-jsx"
14-
);
15-
// “Come, let us go down and there confuse their language, so that
16-
// they may not understand one another's speech.”
17-
// — Genesis 11:7
18-
const jsx =
19-
babelPluginReactJSX.default.default ||
20-
babelPluginReactJSX.default;
21-
return {
22-
plugins: [
23-
jsx(
24-
{},
25-
{
26-
runtime: "automatic",
27-
importSource: "@b9g/crank",
28-
},
29-
),
30-
],
31-
};
32-
},
3311
});
3412
},
3513
},

packages/astro-crank/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
"@babel/plugin-transform-react-jsx": "^7.17.12"
2323
},
2424
"peerDependencies": {
25-
"astro": "^2.0.0",
26-
"@b9g/crank": "^0.5.1"
25+
"astro": "^4.0.0",
26+
"@b9g/crank": "^0.6.0"
2727
},
2828
"engines": {
2929
"node": ">=16.12.0"

0 commit comments

Comments
 (0)