Skip to content

Commit

Permalink
add runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
docimin committed Sep 26, 2024
1 parent ac4582d commit 35eb0e5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ const nextConfig = {
pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
compiler: {
styledComponents: true,
//removeConsole: {
// exclude: ['error'],
//},
removeConsole: {
exclude: ['error', 'info', 'warn'],
},
},
experimental: {
mdxRs: true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": true,
"type": "module",
"scripts": {
"dev": "next dev --turbo",
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
Expand Down
2 changes: 2 additions & 0 deletions src/app/api/device/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { NextRequest, NextResponse, userAgent } from 'next/server'

export const runtime = 'edge'

export async function GET(request: NextRequest) {
const { device } = userAgent(request)
return NextResponse.json(device)
Expand Down

0 comments on commit 35eb0e5

Please sign in to comment.