https 替换
This commit is contained in:
@@ -4,6 +4,7 @@ import vueJsx from '@vitejs/plugin-vue-jsx'
|
||||
import { federation } from '@module-federation/vite'
|
||||
import { resolve, dirname } from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
import fs from 'fs'
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = dirname(__filename)
|
||||
@@ -26,7 +27,7 @@ export default defineConfig({
|
||||
shared: {
|
||||
type: 'module',
|
||||
name: 'shared',
|
||||
entry: 'http://localhost:7000/remoteEntry.js'
|
||||
entry: 'https://org.xyzh.yslg/shared/remoteEntry.js'
|
||||
}
|
||||
},
|
||||
shared: {
|
||||
@@ -55,6 +56,11 @@ export default defineConfig({
|
||||
host: true,
|
||||
cors: true,
|
||||
open: '/', // 开发时自动打开到根路径
|
||||
// HTTPS 配置(使用 mkcert 生成的本地开发证书)
|
||||
https: {
|
||||
key: fs.readFileSync('C:/Users/FK05/443/localhost+3-key.pem'),
|
||||
cert: fs.readFileSync('C:/Users/FK05/443/localhost+3.pem')
|
||||
},
|
||||
hmr: {
|
||||
// 修复 base 路径导致的 WebSocket 连接问题
|
||||
path: '/@vite/client',
|
||||
|
||||
Reference in New Issue
Block a user