-
Notifications
You must be signed in to change notification settings - Fork 32
/
index.js
38 lines (33 loc) · 801 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import path from 'path'
import buildSSR from 'vite-ssr/build.js'
import buildFunctions from './functions.js'
import config from '../config.cjs'
const {
rootDir,
outDir,
clientOutDir,
ssrOutDir,
fnsInDir,
fnsOutFile,
} = config
export default async function () {
await buildSSR({
clientOptions: {
outDir: path.resolve(rootDir, outDir, clientOutDir),
alias: {
vitedge: 'vitedge/entry-client',
},
},
ssrOptions: {
outDir: path.resolve(rootDir, outDir, ssrOutDir),
alias: {
vitedge: 'vitedge/entry-server',
},
},
})
await buildFunctions({
fnsInputPath: path.resolve(rootDir, fnsInDir),
fnsOutputPath: path.resolve(rootDir, outDir, fnsOutFile),
})
process.exit()
}