diff --git a/packages/react-server/examples/basic/deps/cjs/README.md b/packages/react-server/examples/basic/deps/cjs/README.md new file mode 100644 index 000000000..8bcc32c01 --- /dev/null +++ b/packages/react-server/examples/basic/deps/cjs/README.md @@ -0,0 +1,8 @@ +```jsx +// in server component +import { TestServer } from "@hiogawa/test-deps-cjs" + +export default function Page() { + return // should show [ok] +} +``` diff --git a/packages/react-server/examples/basic/deps/cjs/client.js b/packages/react-server/examples/basic/deps/cjs/client.js index 617a2f94f..e885dba61 100644 --- a/packages/react-server/examples/basic/deps/cjs/client.js +++ b/packages/react-server/examples/basic/deps/cjs/client.js @@ -4,5 +4,5 @@ import React from "react"; import dep from "./client-dep.cjs"; export function TestClient() { - return React.createElement("span", null, `[TestClient: ${dep.test}]`); + return React.createElement("span", null, dep.test); } diff --git a/packages/react-server/examples/basic/deps/context/README.md b/packages/react-server/examples/basic/deps/context/README.md new file mode 100644 index 000000000..9bbad5b96 --- /dev/null +++ b/packages/react-server/examples/basic/deps/context/README.md @@ -0,0 +1,21 @@ +```jsx +// in server component + +import { TestServer } from "@hiogawa/test-deps-context/server" +import { TestClient } from "@hiogawa/test-deps-context/client" + +export default function Page() { + return // should show [ok] +} +``` + +```jsx +// in server component + +import { TestServer } from "@hiogawa/test-deps-context/server2" +import { TestClient } from "@hiogawa/test-deps-context/client" + +export default function Page() { + return // should show [ok] +} +```