Skip to content

Commit

Permalink
use type: module in nextjs app
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusmarminge committed Jan 12, 2024
1 parent 6b6aca3 commit 231b724
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/nextjs/app/api/edge/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NextResponse } from "next/server";
import { env } from "~/env.mjs";
import { env } from "~/env";

export const runtime = "edge";

Expand Down
2 changes: 1 addition & 1 deletion examples/nextjs/app/api/node/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NextResponse } from "next/server";
import { env } from "~/env.mjs";
import { env } from "~/env";

export function GET(_request: Request) {
return NextResponse.json({ env, processEnv: process.env });
Expand Down
2 changes: 1 addition & 1 deletion examples/nextjs/app/edge/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { env } from "~/env.mjs";
import { env } from "~/env";

export const runtime = "edge";

Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions examples/nextjs/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { env } from "./env.mjs";
import "./globals.css";
import { Inter } from "next/font/google";

import { env } from "~/env";
import "./globals.css";

const inter = Inter({ subsets: ["latin"] });

export const metadata = {
Expand Down
2 changes: 1 addition & 1 deletion examples/nextjs/app/node/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { env } from "~/env.mjs";
import { env } from "~/env";

export default function Page() {
return (
Expand Down
2 changes: 1 addition & 1 deletion examples/nextjs/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use client";
import { env } from "./env.mjs";
import { env } from "~/env";

export default function HomePage() {
return <div>Client says {env.NEXT_PUBLIC_GREETING}!</div>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "./app/env.mjs";
import "./app/env.js";

/** @type {import('next').NextConfig} */
const nextConfig = {
Expand Down
1 change: 1 addition & 0 deletions examples/nextjs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@examples/nextjs",
"type": "module",
"version": "0.1.0",
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion examples/nextjs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"~/*": ["./app/*"]
}
},
"include": ["next-env.d.ts", "app", ".next/types/**/*.ts", "next.config.mjs"],
"include": ["next-env.d.ts", "app", ".next/types/**/*.ts", "*.js"],
"exclude": ["node_modules"]
}

2 comments on commit 231b724

@vercel
Copy link

@vercel vercel bot commented on 231b724 Jan 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

t3-env – ./docs

env.t3.wtf
t3-env.vercel.app
t3-env-git-main-t3-oss.vercel.app
t3-env-t3-oss.vercel.app
env.t3.gg

@vercel
Copy link

@vercel vercel bot commented on 231b724 Jan 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

t3-env-nextjs – ./examples/nextjs

t3-env-nextjs-git-main-t3-oss.vercel.app
t3-env-nextjs-t3-oss.vercel.app
t3-env-nextjs.vercel.app

Please sign in to comment.