Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
nailiable committed Nov 7, 2024
1 parent 3cb4844 commit 5a3bf08
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/main.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
// backend/main.ts
/// <reference types="vite/client" />

import { NodeAdapter } from '@nailyjs/backend/node-adapter'
import { RpcBootstrap } from '@nailyjs/rpc'
import './welcome-server'

// You must export `app` for the plugin to work.
// 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)
Expand Down
4 changes: 4 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export default defineConfig({
},
},

build: {
outDir: './dist/frontend',
},

plugins: [
Rpc({
buildOnViteCloseBundle: false,
Expand Down

0 comments on commit 5a3bf08

Please sign in to comment.