mirror of
https://github.com/ArthurDanjou/trpc-nuxt.git
synced 2026-01-14 12:14:40 +01:00
remove unused module imports
This commit is contained in:
@@ -19,7 +19,7 @@ const t = initTRPC.context<Context>().create()
|
||||
// We explicitly export the methods we use here
|
||||
// This allows us to create reusable & protected base procedures
|
||||
export const middleware = t.middleware
|
||||
const router = t.router
|
||||
export const router = t.router
|
||||
export const publicProcedure = t.procedure
|
||||
|
||||
const anotherRouter = router({
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { fileURLToPath } from 'url'
|
||||
import { join, resolve } from 'pathe'
|
||||
import { join } from 'pathe'
|
||||
import { defu } from 'defu'
|
||||
import dedent from 'dedent'
|
||||
|
||||
import { addPlugin, addServerHandler, addTemplate, defineNuxtModule } from '@nuxt/kit'
|
||||
import { addServerHandler, addTemplate, defineNuxtModule } from '@nuxt/kit'
|
||||
|
||||
export interface ModuleOptions {
|
||||
baseURL: string
|
||||
@@ -32,26 +32,17 @@ export default defineNuxtModule<ModuleOptions>({
|
||||
endpoint: options.endpoint,
|
||||
})
|
||||
|
||||
// addImports([
|
||||
// { name: 'useClient', from: join(runtimeDir, 'client') },
|
||||
// { name: 'useAsyncQuery', from: join(runtimeDir, 'client') },
|
||||
// { name: 'useClientHeaders', from: join(runtimeDir, 'client') },
|
||||
// { name: 'getQueryKey', from: join(runtimeDir, 'client') },
|
||||
// ])
|
||||
|
||||
addServerHandler({
|
||||
route: `${finalConfig.endpoint}/*`,
|
||||
handler: handlerPath,
|
||||
})
|
||||
|
||||
// addPlugin(resolve(runtimeDir, 'plugin'))
|
||||
|
||||
addTemplate({
|
||||
filename: 'trpc-handler.ts',
|
||||
write: true,
|
||||
getContents() {
|
||||
return dedent`
|
||||
import { createTRPCHandler } from 'trpc-nuxt/api'
|
||||
import { createTRPCHandler } from 'trpc-nuxt/server'
|
||||
import * as functions from '${trpcOptionsPath}'
|
||||
|
||||
export default createTRPCHandler({
|
||||
|
||||
Reference in New Issue
Block a user