From 5a3bf083b1e13accd6ccd925da11457d1a7587c7 Mon Sep 17 00:00:00 2001 From: Naily Date: Thu, 7 Nov 2024 17:59:14 +0800 Subject: [PATCH] fix: build --- backend/main.ts | 2 ++ vite.config.ts | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/backend/main.ts b/backend/main.ts index cd6e1db..81dd7da 100644 --- a/backend/main.ts +++ b/backend/main.ts @@ -1,6 +1,7 @@ // backend/main.ts /// +import { NodeAdapter } from '@nailyjs/backend/node-adapter' import { RpcBootstrap } from '@nailyjs/rpc' import './welcome-server' @@ -8,6 +9,7 @@ import './welcome-server' // you also can configure your export key in the plugin options. export const app = new RpcBootstrap() .setBaseURL('/rpc') + .setBackendAdapter(NodeAdapter) // It will be called when environment is production mode if (import.meta.env.PROD) diff --git a/vite.config.ts b/vite.config.ts index 417755d..738a500 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -27,6 +27,10 @@ export default defineConfig({ }, }, + build: { + outDir: './dist/frontend', + }, + plugins: [ Rpc({ buildOnViteCloseBundle: false,