v1.0.2 - Github actions configuration updates
This commit is contained in:
2
.github/workflows/deploy-github-pages.yml
vendored
2
.github/workflows/deploy-github-pages.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
||||
run: npm ci
|
||||
|
||||
- name: Build demo
|
||||
run: npm run build:pages
|
||||
run: npm run build:demo
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v4
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
"dev:demo": "vite",
|
||||
"build": "vue-tsc -b && vite build",
|
||||
"build:demo": "vue-tsc -b && vite build",
|
||||
"build:pages": "NODE_ENV=production vue-tsc -b && vite build",
|
||||
"build:lib": "vite build --config vite.config.lib.ts",
|
||||
"preview": "vite preview",
|
||||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
|
||||
|
||||
@@ -2,10 +2,10 @@ import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
export default defineConfig(({ command }) => ({
|
||||
plugins: [vue()],
|
||||
// GitHub Pages 部署时的 base 路径
|
||||
base: process.env.NODE_ENV === 'production' ? '/jordium-gantt-vue3/' : '/',
|
||||
base: command === 'build' ? '/jordium-gantt-vue3/' : '/',
|
||||
// 开发服务器配置
|
||||
root: 'demo',
|
||||
// 构建配置
|
||||
@@ -19,4 +19,4 @@ export default defineConfig({
|
||||
'@': '../src',
|
||||
},
|
||||
},
|
||||
})
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user