feat: allow changing of src dir

This commit is contained in:
Robert Soriano
2022-06-05 17:05:13 -07:00
parent e4f42d5322
commit 2620379e02
3 changed files with 11 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
import { fileURLToPath } from 'url'
import { join, resolve } from 'pathe'
import { defu } from 'defu'
// @ts-expect-error: No types
import dedent from 'dedent'
import { addPlugin, addServerHandler, addTemplate, defineNuxtModule } from '@nuxt/kit'
@@ -53,7 +55,7 @@ export default defineNuxtModule<ModuleOptions>({
filename: 'trpc-handler.ts',
write: true,
getContents() {
return `
return dedent`
import { createTRPCHandler } from 'trpc-nuxt/api'
import * as functions from '${trpcOptionsPath}'