mirror of
https://github.com/ArthurDanjou/trpc-nuxt.git
synced 2026-01-14 20:19:33 +01:00
refactor: use trpc url from config
This commit is contained in:
@@ -51,14 +51,11 @@ export default defineNuxtModule<ModuleOptions>({
|
||||
getContents() {
|
||||
return `
|
||||
import { createTRPCHandler } from 'trpc-nuxt/api'
|
||||
import { useRuntimeConfig } from '#imports'
|
||||
import * as functions from '${trpcOptionsPath}'
|
||||
|
||||
const { trpc: { trpcURL } } = useRuntimeConfig().public
|
||||
|
||||
export default createTRPCHandler({
|
||||
...functions,
|
||||
trpcURL
|
||||
trpcURL: '${finalConfig.trpcURL}'
|
||||
})
|
||||
`
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user