Skip to content

Commit

Permalink
fix(stash): export react (#3331)
Browse files Browse the repository at this point in the history
  • Loading branch information
holic authored Oct 24, 2024
1 parent b015553 commit d0aea26
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
6 changes: 5 additions & 1 deletion packages/stash/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"type": "module",
"exports": {
".": "./dist/index.js",
"./internal": "./dist/internal.js"
"./internal": "./dist/internal.js",
"./react": "./dist/react.js"
},
"typesVersions": {
"*": {
Expand All @@ -20,6 +21,9 @@
],
"internal": [
"./dist/internal.d.ts"
],
"react": [
"./dist/react.d.ts"
]
}
},
Expand Down
1 change: 1 addition & 0 deletions packages/stash/src/exports/react.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { useStash, type UseStashOptions } from "../react/useStash";
5 changes: 1 addition & 4 deletions packages/stash/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { defineConfig } from "tsup";

export default defineConfig((opts) => ({
entry: {
index: "src/exports/index.ts",
internal: "src/exports/internal.ts",
},
entry: ["src/exports/index.ts", "src/exports/internal.ts", "src/exports/react.ts"],
target: "esnext",
format: ["esm"],
sourcemap: true,
Expand Down
1 change: 1 addition & 0 deletions tsconfig.paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@latticexyz/schema-type/*": ["./packages/schema-type/src/typescript/exports/*.ts"],
"@latticexyz/stash": ["./packages/stash/ts/exports/index.ts"],
"@latticexyz/stash/internal": ["./packages/stash/ts/exports/internal.ts"],
"@latticexyz/stash/react": ["./packages/stash/ts/exports/react.ts"],
"@latticexyz/store": ["./packages/store/ts/exports/index.ts"],
"@latticexyz/store/mud.config": ["./packages/store/mud.config.ts"],
"@latticexyz/store/codegen": ["./packages/store/ts/codegen/index.ts"],
Expand Down

0 comments on commit d0aea26

Please sign in to comment.