init
This commit is contained in:
39
vite.config.ts
Normal file
39
vite.config.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import reactStack from 'hono-vite-react-stack-node'
|
||||
import { defineConfig } from 'vite'
|
||||
import i18nextLoader from 'vite-plugin-i18next-loader'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
i18nextLoader({
|
||||
paths: ['src/client/i18n/locales']
|
||||
}),
|
||||
reactStack({
|
||||
minify: false,
|
||||
port: 8080
|
||||
}),
|
||||
],
|
||||
// 配置 @ 别名
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': '/src',
|
||||
},
|
||||
},
|
||||
build:{
|
||||
// assetsDir: 'ai-assets',
|
||||
},
|
||||
ssr:{
|
||||
external:[
|
||||
'dotenv','typeorm','bcrypt', '@d8d-appcontainer/api',
|
||||
'mysql2', 'ioredis','reflect-metadata',
|
||||
'@hono/node-server', 'jsonwebtoken', 'minio',
|
||||
'node-fetch', 'node-cron',
|
||||
'@alicloud/dysmsapi20170525', '@alicloud/openapi-client',
|
||||
'@alicloud/tea-util'
|
||||
]
|
||||
},
|
||||
server:{
|
||||
host:'0.0.0.0',
|
||||
port: 8080,
|
||||
allowedHosts: true,
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user