Skip to content

Commit

Permalink
chore: switching to the same pattern with connect
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyxiao committed Nov 26, 2023
1 parent 5bea871 commit fa1f816
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
3 changes: 1 addition & 2 deletions apps/web/app/connect/callback/CallbackEffect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

import {Loader2} from 'lucide-react'
import React from 'react'

import type {FrameMessage} from '@usevenice/connect/common'
import type {FrameMessage} from '@usevenice/connect'

export function CallbackEffect(props: {
msg: FrameMessage | null
Expand Down
7 changes: 1 addition & 6 deletions apps/web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@
"jsx": "preserve",
"strictNullChecks": true,
"plugins": [{"name": "next"}],
"paths": {
"@/*": ["./*"],
// Override because we don't want to use ./dist unnecessarily
"@usevenice/connect": ["../../kits/connect/src/index.ts"],
"@usevenice/connect/*": ["../../kits/connect/src/*"]
}
"paths": {"@/*": ["./*"]}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
Expand Down
3 changes: 3 additions & 0 deletions kits/connect/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Do not but any other logic in this file, which is only used to re-export from
// src/index so that vscode jump to definition works inside the monorepo
export * from './src/index'
7 changes: 1 addition & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,7 @@
// In practice no module outside apps/web should use the `@/` alias ever
// In addition to opening the door to invalid imports this also prevents us
// from two separate next.js apps in the same monorepo which might be relevant for future
"paths": {
"@/*": ["./apps/web/*"],
// Override because we don't want to use ./dist unnecessarily
"@usevenice/connect": ["./kits/connect/src/index.ts"],
"@usevenice/connect/*": ["./kits/connect/src/*"]
}
"paths": {"@/*": ["./apps/web/*"]}
},
"include": ["env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
Expand Down

0 comments on commit fa1f816

Please sign in to comment.