mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
refactor: Implement @/* path aliases and move dotenv imports
This commit is contained in:
5
.changeset/khaki-garlics-trade.md
Normal file
5
.changeset/khaki-garlics-trade.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"create-better-t-stack": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Implement @/\* path aliases and move dotenv imports
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
|
import "dotenv/config";
|
||||||
{{#if (eq runtime "node")}}
|
{{#if (eq runtime "node")}}
|
||||||
import { node } from "@elysiajs/node";
|
import { node } from "@elysiajs/node";
|
||||||
{{/if}}
|
{{/if}}
|
||||||
import "dotenv/config";
|
|
||||||
import { Elysia } from "elysia";
|
import { Elysia } from "elysia";
|
||||||
import { cors } from "@elysiajs/cors";
|
import { cors } from "@elysiajs/cors";
|
||||||
{{#if (eq api "trpc")}}
|
{{#if (eq api "trpc")}}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import "dotenv/config";
|
||||||
{{#if (eq api "orpc")}}
|
{{#if (eq api "orpc")}}
|
||||||
import { RPCHandler } from "@orpc/server/fetch";
|
import { RPCHandler } from "@orpc/server/fetch";
|
||||||
import { createContext } from "./lib/context";
|
import { createContext } from "./lib/context";
|
||||||
@@ -9,7 +10,6 @@ import { auth } from "./lib/auth";
|
|||||||
{{#if (eq api "trpc")}}
|
{{#if (eq api "trpc")}}
|
||||||
import { trpcServer } from "@hono/trpc-server";
|
import { trpcServer } from "@hono/trpc-server";
|
||||||
{{/if}}
|
{{/if}}
|
||||||
import "dotenv/config";
|
|
||||||
import { Hono } from "hono";
|
import { Hono } from "hono";
|
||||||
import { cors } from "hono/cors";
|
import { cors } from "hono/cors";
|
||||||
import { logger } from "hono/logger";
|
import { logger } from "hono/logger";
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"target": "ESNext",
|
|
||||||
"module": "ESNext",
|
|
||||||
"moduleResolution": "bundler",
|
|
||||||
"verbatimModuleSyntax": true,
|
|
||||||
"strict": true,
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"baseUrl": "./",
|
|
||||||
"outDir": "./dist",
|
|
||||||
"types": ["node", "bun"],
|
|
||||||
"jsx": "react-jsx",
|
|
||||||
"jsxImportSource": "hono/jsx"
|
|
||||||
},
|
|
||||||
"tsc-alias": {
|
|
||||||
"resolveFullPaths": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
29
apps/cli/templates/backend/server-base/tsconfig.json.hbs
Normal file
29
apps/cli/templates/backend/server-base/tsconfig.json.hbs
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ESNext",
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"verbatimModuleSyntax": true,
|
||||||
|
"strict": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"baseUrl": "./",
|
||||||
|
"paths": {
|
||||||
|
"@/*": ["./src/*"]
|
||||||
|
},
|
||||||
|
"outDir": "./dist",
|
||||||
|
"types": [
|
||||||
|
{{#if (eq runtime 'node')}}
|
||||||
|
"node"
|
||||||
|
{{else if (eq runtime 'bun')}}
|
||||||
|
"bun"
|
||||||
|
{{else}}
|
||||||
|
"node", "bun"
|
||||||
|
{{/if}}
|
||||||
|
],
|
||||||
|
"jsx": "react-jsx"{{#if (eq backend 'hono')}},
|
||||||
|
"jsxImportSource": "hono/jsx"{{/if}}
|
||||||
|
},
|
||||||
|
"tsc-alias": {
|
||||||
|
"resolveFullPaths": true
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user