fix: exports browser default query module

This commit is contained in:
xion 2024-11-02 23:50:46 +08:00
parent 61d949cc7c
commit 63cb0162df
3 changed files with 11 additions and 5 deletions

7
.gitignore vendored
View File

@ -1,2 +1,9 @@
node_modules node_modules
dist dist
build
.cache
.DS_Store
*.log
.turbo

View File

@ -1,6 +1,6 @@
{ {
"name": "@kevisual/query", "name": "@kevisual/query",
"version": "0.0.7-alpha.2", "version": "0.0.7-alpha.3",
"main": "dist/index.js", "main": "dist/index.js",
"module": "dist/index.js", "module": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",

View File

@ -1,8 +1,9 @@
import { adapter } from './adapter.ts'; import { adapter } from './adapter.ts';
import { QueryWs, QueryWsOpts } from './ws.ts'; import { QueryWs, QueryWsOpts } from './ws.ts';
export { QueryOpts, QueryWs };
import { Query } from './query.ts'; import { Query } from './query.ts';
export { QueryOpts, QueryWs, Query, QueryWsOpts, adapter };
type QueryOpts = { type QueryOpts = {
url?: string; url?: string;
adapter?: typeof adapter; adapter?: typeof adapter;
@ -50,5 +51,3 @@ export class QueryClient<U = any, V = any> extends Query<U, V> {
} }
} }
export const client = new QueryClient(); export const client = new QueryClient();
export { adapter };