Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Dec 15, 2024
1 parent a28a793 commit 6e618ff
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/react-server/examples/basic/deps/cjs/server.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import React from "react";

// when consuming client component internally,
// this cannot be optimized and thus cjs dep fails.
import { TestClient } from "./client.js";

export function TestServer() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"type": "module",
"exports": {
"./server": "./server.js",
"./server2": "./server2.js",
"./client": "./client.js"
},
"dependencies": {
Expand Down
9 changes: 9 additions & 0 deletions packages/react-server/examples/basic/deps/context/server2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from "react";
// difference from `server.js` is that this refers relatively `./client.js`
// instead of self reference of export `@hiogawa/test-deps-context/client`
import { MyContextProvider } from "./client.js";

// consume own provider in server entr
export function TestServer(props) {
return React.createElement(MyContextProvider, null, props.children);
}

0 comments on commit 6e618ff

Please sign in to comment.