Compare commits
5 Commits
44d5209e89
...
rolldown-v
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e82b8575d1 | ||
![]() |
3b76e57df5 | ||
![]() |
eb600d0b6b | ||
![]() |
87e701042f | ||
![]() |
306ed9a527 |
2
.env
2
.env
@@ -1,2 +1,4 @@
|
||||
VITE_BASE=/
|
||||
VITE_BUILD_SOURCE_MAP=true
|
||||
VITE_BUILD_COMMIT=
|
||||
VITE_BUILD_TIME=
|
||||
|
3
.github/workflows/ci-cd.yaml
vendored
3
.github/workflows/ci-cd.yaml
vendored
@@ -28,6 +28,9 @@ jobs:
|
||||
env:
|
||||
VITE_BUILD_COMMIT: ${{ github.sha }}
|
||||
|
||||
- name: 🧪 单元测试
|
||||
run: pnpm run test:unit
|
||||
|
||||
- name: 📊 计算构建大小
|
||||
run: |
|
||||
echo "📊 构建大小统计:"
|
||||
|
2
.github/workflows/playwright.yaml
vendored
2
.github/workflows/playwright.yaml
vendored
@@ -18,6 +18,8 @@ jobs:
|
||||
uses: yanhao98/composite-actions/setup-node-environment@25eb4dc0c134cc9df2b7c569aa54140a366b45a8
|
||||
# - name: 📥 安装 Playwright 浏览器
|
||||
# run: pnpm exec playwright install --with-deps
|
||||
- name: 🔄 更新依赖
|
||||
run: pnpm update --latest
|
||||
- name: 📦 构建项目
|
||||
run: pnpm run build-only
|
||||
- name: ▶️ 运行 Playwright 测试
|
||||
|
@@ -49,13 +49,15 @@
|
||||
]
|
||||
},
|
||||
"pnpm": {
|
||||
"overrides": {}
|
||||
"overrides": {
|
||||
"vite": "$vite"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@commitlint/cli": "^19.8.1",
|
||||
"@commitlint/config-conventional": "^19.8.1",
|
||||
"@formkit/auto-animate": "^0.9.0",
|
||||
"@pinia/colada": "^0.17.3",
|
||||
"@pinia/colada": "^0.17.4",
|
||||
"@primeuix/themes": "^1.2.3",
|
||||
"@unhead/vue": "^2.0.14",
|
||||
"@vueuse/core": "^13.9.0",
|
||||
@@ -99,7 +101,6 @@
|
||||
"nprogress": "^0.2.0",
|
||||
"oxlint": "~1.14.0",
|
||||
"prettier": "3.6.2",
|
||||
"rolldown": "1.0.0-beta.36",
|
||||
"typescript": "~5.9.2",
|
||||
"unocss": "^66.5.1",
|
||||
"unocss-preset-animations": "^1.2.1",
|
||||
@@ -108,7 +109,7 @@
|
||||
"unplugin-vue-components": "^29.0.0",
|
||||
"unplugin-vue-markdown": "^29.1.0",
|
||||
"unplugin-vue-router": "^0.15.0",
|
||||
"vite": "^7.1.5",
|
||||
"vite": "npm:rolldown-vite@^7.1.9",
|
||||
"vite-plugin-checker": "^0.10.3",
|
||||
"vite-plugin-fake-server": "^2.2.0",
|
||||
"vite-plugin-image-optimizer": "^2.0.2",
|
||||
|
@@ -2,7 +2,7 @@ import { defineConfig, devices } from '@playwright/test'
|
||||
import process from 'node:process'
|
||||
|
||||
// const runningInVSCode = process.env.TERM_PROGRAM === 'vscode'
|
||||
const baseURL = process.env.CI ? 'http://localhost:4173' : 'http://localhost:4730'
|
||||
const baseURL = 'http://localhost:4173'
|
||||
|
||||
/**
|
||||
* Read environment variables from file.
|
||||
@@ -106,8 +106,8 @@ export default defineConfig({
|
||||
* Use the preview server on CI for more realistic testing.
|
||||
* Playwright will re-use the local server if there is already a dev-server running.
|
||||
*/
|
||||
command: process.env.CI ? 'pnpm run preview' : 'pnpm run dev',
|
||||
command: 'pnpm run build-only; pnpm run preview',
|
||||
port: Number(new URL(baseURL).port),
|
||||
reuseExistingServer: !process.env.CI,
|
||||
reuseExistingServer: true /* !process.env.CI */,
|
||||
},
|
||||
})
|
||||
|
485
pnpm-lock.yaml
generated
485
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,18 +1,19 @@
|
||||
import { fileURLToPath, URL } from 'node:url'
|
||||
import { createViteProxy } from 'utils4u/vite'
|
||||
import { defineConfig, type DepOptimizationOptions } from 'vite'
|
||||
import { defineConfig, loadEnv, type DepOptimizationOptions } from 'vite'
|
||||
|
||||
import { Plugins } from './vite.config.plugins'
|
||||
// import { createRolldownSplitChunks } from './vite.config.rolldown.split-chunks'
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig(({ command /* mode */ }) => {
|
||||
export default defineConfig(({ command, mode }) => {
|
||||
const isBuild = command === 'build'
|
||||
// const env = loadEnv(mode, process.cwd())
|
||||
const env = loadEnv(mode, process.cwd())
|
||||
|
||||
return {
|
||||
// build: createRolldownSplitChunks(),
|
||||
// base: env.VITE_BASE,
|
||||
base: env.VITE_BASE,
|
||||
build: {
|
||||
sourcemap: env.VITE_BUILD_SOURCE_MAP === 'true',
|
||||
},
|
||||
plugins: Plugins(),
|
||||
resolve: {
|
||||
alias: {
|
||||
|
Reference in New Issue
Block a user