update at 2026-02-12 17:30:41
This commit is contained in:
23
vite.config.ts
Normal file
23
vite.config.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { homedir } from 'node:os';
|
||||
import { join } from 'node:path';
|
||||
|
||||
const certDir = join(homedir(), 'mac.biboer.cn_ecc');
|
||||
const httpsCert = readFileSync(join(certDir, 'fullchain.cer'));
|
||||
const httpsKey = readFileSync(join(certDir, 'mac.biboer.cn.key'));
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
port: 5173,
|
||||
strictPort: true,
|
||||
allowedHosts: ['mac.biboer.cn'],
|
||||
https: {
|
||||
cert: httpsCert,
|
||||
key: httpsKey
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user