Skip to content

Commit 6cfd62e

Browse files
committed
fix build
1 parent 988b3e0 commit 6cfd62e

5 files changed

Lines changed: 12 additions & 8 deletions

File tree

MyApp.Client/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# next.js
1212
/.next/
1313
/out/
14+
/dist/
1415

1516
# production
1617
/build

MyApp.Client/_posts/ai-chat.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ where you can override any of [AI Chat's Vue Components](https://github.com/Serv
8282
and override them with your own by placing them in your
8383
[/wwwroot/chat](https://github.com/ServiceStack/ServiceStack/tree/main/ServiceStack/tests/AdhocNew/wwwroot/chat) folder:
8484

85-
```files
85+
```txt
8686
/wwwroot
8787
/chat
8888
Brand.mjs
@@ -102,7 +102,7 @@ Where you'll be able to customize the appearance and behavior of AI Chat's UI to
102102
The built-in [ui.json](https://github.com/ServiceStack/ServiceStack/blob/main/ServiceStack/src/ServiceStack.AI.Chat/chat/ui.json)
103103
configuration can be overridden with your own to use your preferred system prompts and other defaults by adding them to your local folder:
104104

105-
```files
105+
```txt
106106
/wwwroot
107107
/chat
108108
llms.json
@@ -564,7 +564,7 @@ The easiest way to use a custom `llms.json` is to add a local modified copy of
564564
[llms.json](https://github.com/ServiceStack/ServiceStack/blob/main/ServiceStack/src/ServiceStack.AI.Chat/chat/llms.json)
565565
to your App's `/wwwroot/chat` folder:
566566

567-
```files
567+
```txt
568568
/wwwroot
569569
/chat
570570
llms.json

MyApp.Client/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
import "./dist/dev/types/routes.d.ts";
3+
import "./.next/types/routes.d.ts";
44

55
// NOTE: This file should not be edited
66
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.

MyApp.Client/next.config.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ const target = process.env.ASPNETCORE_HTTPS_PORT ? `https://localhost:${process.
55

66
const isProd = process.env.NODE_ENV === 'production'
77
const buildLocal = process.env.MODE === 'local'
8-
const API_URL = isProd ? DEPLOY_API : (buildLocal ? '' : target)
98

10-
// TODO: replace with production URL of .NET App, e.g. https://nextjs.web-templates.io
9+
// Define DEPLOY_API first
1110
const DEPLOY_API = process.env.KAMAL_DEPLOY_HOST
1211
? `https://${process.env.KAMAL_DEPLOY_HOST}`
1312
: target
1413

14+
// Now use it for API_URL
15+
const API_URL = isProd ? DEPLOY_API : (buildLocal ? '' : target)
16+
1517
console.log('next.config.mjs', process.env.NODE_ENV, buildLocal, API_URL, process.env.KAMAL_DEPLOY_HOST)
1618

1719
/**

MyApp.Client/tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "es5",
3+
"target": "es2018",
44
"module": "esnext",
55
"jsx": "react-jsx",
66
"strict": true,
@@ -24,7 +24,8 @@
2424
}
2525
},
2626
"exclude": [
27-
"node_modules"
27+
"node_modules",
28+
"dist"
2829
],
2930
"include": [
3031
"next-env.d.ts",

0 commit comments

Comments
 (0)