diff --git a/client.d.ts b/client.d.ts index 047203f..875737f 100644 --- a/client.d.ts +++ b/client.d.ts @@ -1 +1 @@ -export * from './dist/runtime/client' +export * from './dist/client' diff --git a/package.json b/package.json index 045f47c..961215a 100644 --- a/package.json +++ b/package.json @@ -1,24 +1,22 @@ { "name": "trpc-nuxt", - "type": "module", "version": "0.3.1", "packageManager": "pnpm@7.5.0", "license": "MIT", - "main": "./dist/module.cjs", - "types": "./dist/types.d.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", "exports": { "./package.json": "./package.json", ".": { - "import": "./dist/module.mjs", - "require": "./dist/module.cjs" - }, - "./server": { - "import": "./dist/runtime/server.mjs", - "types": "./dist/runtime/server.d.ts" + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" }, "./client": { - "import": "./dist/runtime/client.mjs", - "types": "./dist/runtime/client.d.ts" + "require": "./dist/client.js", + "import": "./dist/client.mjs", + "types": "./dist/client.d.ts" } }, "files": [ @@ -27,40 +25,33 @@ ], "scripts": { "prepublishOnly": "nr build", - "build": "nuxt-module-build", - "play": "nr build && nuxi dev playground", - "build:playground": "nuxi build playground", + "build": "tsup", "lint": "eslint .", "lint:fix": "eslint . --fix", - "release": "bumpp --commit --push --tag && npm publish", - "prepare": "nuxi prepare playground" + "release": "bumpp --commit --push --tag && npm publish" }, "peerDependencies": { "@trpc/client": "^10.0.0-proxy-beta.21", - "@trpc/server": "^10.0.0-proxy-beta.21" + "@trpc/server": "^10.0.0-proxy-beta.21", + "nuxt": "^3.0.0-rc.12" }, "dependencies": { - "@nuxt/kit": "3.0.0-rc.12", - "dedent": "^0.7.0", - "defu": "^6.1.0", "h3": "^0.8.5", "ohash": "^0.1.5", - "pathe": "^0.3.9", + "ohmyfetch": "^0.4.20", "ufo": "^0.8.6" }, "devDependencies": { "@antfu/eslint-config": "^0.23.1", "@antfu/ni": "^0.16.2", - "@nuxt/module-builder": "^0.2.0", "@trpc/client": "10.0.0-rc.1", "@trpc/server": "10.0.0-rc.1", - "@types/dedent": "^0.7.0", "bumpp": "^7.2.0", "eslint": "^8.25.0", "nuxt": "3.0.0-rc.12", "pnpm": "^7.5.0", - "trpc-nuxt": "workspace:*", - "zod": "^3.19.1" + "tsup": "^6.3.0", + "typescript": "4.5.4" }, "eslintConfig": { "extends": "@antfu", diff --git a/playground/nuxt.config.ts b/playground/nuxt.config.ts index b85f10e..970f193 100644 --- a/playground/nuxt.config.ts +++ b/playground/nuxt.config.ts @@ -1,8 +1,5 @@ -import Module from '../src/module' - // https://v3.nuxtjs.org/api/configuration/nuxt.config export default defineNuxtConfig({ - modules: [Module], runtimeConfig: { baseURL: '', }, diff --git a/playground/package.json b/playground/package.json index 51466b1..e433c56 100644 --- a/playground/package.json +++ b/playground/package.json @@ -1,4 +1,18 @@ { "name": "playground", - "private": true + "private": true, + "scripts": { + "build": "nuxt build", + "dev": "nuxt dev", + "generate": "nuxt generate", + "preview": "nuxt preview", + "postinstall": "nuxt prepare" + }, + "dependencies": { + "trpc-nuxt": "workspace:*", + "zod": "^3.19.1" + }, + "devDependencies": { + "nuxt": "3.0.0-rc.12" + } } diff --git a/playground/pages/index.vue b/playground/pages/index.vue index 1dab210..bd56eed 100644 --- a/playground/pages/index.vue +++ b/playground/pages/index.vue @@ -1,7 +1,6 @@