Skip to content

Commit

Permalink
fix: fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Dec 15, 2024
1 parent c802f78 commit 1e7a2e7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/react-server/examples/basic/deps/cjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"exports": {
"./server": "./server.js",
"./server2": "./server2.js",
"./client": "./cilent.js"
"./client": "./client.js"
},
"dependencies": {
"react": "*"
Expand Down
4 changes: 2 additions & 2 deletions packages/react-server/examples/basic/deps/context/server2.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// difference from `server.js` is that
// this uses self exports reference `@hiogawa/test-deps-context/client`
// this uses self exports reference `@hiogawa/test-dep-context/client`
// instead of relative reference `./client.js`
import { MyContextProvider } from "@hiogawa/test-deps-context/client";
import { MyContextProvider } from "@hiogawa/test-dep-context/client";
import React from "react";

// consume own provider in server entr
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// TODO: self reference not resolved (vite bug?)

// @ts-ignore
// import { TestServer } from "@hiogawa/test-dep-cjs/server2";
import { TestServer } from "@hiogawa/test-dep-cjs/server2";

export default function Page() {
return <div>{/* <TestServer /> */}</div>;
return <div>
<TestServer />
</div>;
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// // @ts-ignore
// import { TestClient } from "@hiogawa/test-dep-context/client";
// // @ts-ignore
// import { TestServer } from "@hiogawa/test-dep-context/server2";
// @ts-ignore
import { TestClient } from "@hiogawa/test-dep-context/client";
// @ts-ignore
import { TestServer } from "@hiogawa/test-dep-context/server2";

export default function Page() {
return (
<div>
{/* <TestServer>
<TestServer>
<TestClient />
</TestServer> */}
</TestServer>
</div>
);
}

0 comments on commit 1e7a2e7

Please sign in to comment.