This commit is contained in:
abearxiong 2025-01-03 00:48:49 +08:00
parent 5a578a5594
commit 31fd40f5d8
3 changed files with 66 additions and 1 deletions

View File

@ -5,6 +5,7 @@
"main": "index.js",
"scripts": {
"dev": "vite",
"dev:web": "cross-env WEB_DEV=true vite --mode web",
"build": "vite build",
"preview": "vite preview",
"prepub": "envision switchOrg user",
@ -25,6 +26,7 @@
"@kevisual/types": "^0.0.5",
"@types/react": "^19.0.2",
"@vitejs/plugin-basic-ssl": "^1.2.0",
"cross-env": "^7.0.3",
"react": "^19.0.0",
"vite": "^6.0.6"
}

56
pnpm-lock.yaml generated
View File

@ -33,6 +33,9 @@ importers:
'@vitejs/plugin-basic-ssl':
specifier: ^1.2.0
version: 1.2.0(vite@6.0.6(@types/node@22.10.3)(terser@5.37.0))
cross-env:
specifier: ^7.0.3
version: 7.0.3
react:
specifier: ^19.0.0
version: 19.0.0
@ -368,6 +371,15 @@ packages:
commander@2.20.3:
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
cross-env@7.0.3:
resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==}
engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'}
hasBin: true
cross-spawn@7.0.6:
resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==}
engines: {node: '>= 8'}
csstype@3.1.3:
resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==}
@ -387,6 +399,9 @@ packages:
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
os: [darwin]
isexe@2.0.0:
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
lodash-es@4.17.21:
resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==}
@ -399,6 +414,10 @@ packages:
resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==}
engines: {node: '>= 6.13.0'}
path-key@3.1.1:
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
engines: {node: '>=8'}
path-to-regexp@8.2.0:
resolution: {integrity: sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==}
engines: {node: '>=16'}
@ -432,6 +451,14 @@ packages:
serialize-javascript@6.0.2:
resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==}
shebang-command@2.0.0:
resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==}
engines: {node: '>=8'}
shebang-regex@3.0.0:
resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
engines: {node: '>=8'}
smob@1.5.0:
resolution: {integrity: sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==}
@ -494,6 +521,11 @@ packages:
yaml:
optional: true
which@2.0.2:
resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==}
engines: {node: '>= 8'}
hasBin: true
ws@8.18.0:
resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==}
engines: {node: '>=10.0.0'}
@ -718,6 +750,16 @@ snapshots:
commander@2.20.3: {}
cross-env@7.0.3:
dependencies:
cross-spawn: 7.0.6
cross-spawn@7.0.6:
dependencies:
path-key: 3.1.1
shebang-command: 2.0.0
which: 2.0.2
csstype@3.1.3: {}
dayjs@1.11.13: {}
@ -755,12 +797,16 @@ snapshots:
fsevents@2.3.3:
optional: true
isexe@2.0.0: {}
lodash-es@4.17.21: {}
nanoid@3.3.8: {}
node-forge@1.3.1: {}
path-key@3.1.1: {}
path-to-regexp@8.2.0: {}
picocolors@1.1.1: {}
@ -813,6 +859,12 @@ snapshots:
dependencies:
randombytes: 2.1.0
shebang-command@2.0.0:
dependencies:
shebang-regex: 3.0.0
shebang-regex@3.0.0: {}
smob@1.5.0: {}
source-map-js@1.2.1: {}
@ -843,4 +895,8 @@ snapshots:
fsevents: 2.3.3
terser: 5.37.0
which@2.0.2:
dependencies:
isexe: 2.0.0
ws@8.18.0: {}

View File

@ -4,10 +4,17 @@ import dayjs from 'dayjs';
import path from 'path';
const isDev = process.env.NODE_ENV === 'development';
const isWebDev = process.env.WEB_DEV === 'true';
const BUILD_TIME = dayjs().format('YYYY-MM-DD HH:mm:ss');
let plugins = [];
if (!isWebDev) {
// 在bolt的web开发环境下不需要ssl
plugins.push(basicSsl());
}
export default defineConfig({
plugins: [basicSsl()],
plugins: [],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),