Skip to content

Commit 6b10b6b

Browse files
committed
fix: update build command to use dynamic base path and remove hardcoded base in Vite config
1 parent c9e9ab4 commit 6b10b6b

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ jobs:
3838
- name: Install dependencies
3939
run: npm ci
4040
- name: Build
41-
run: npm run build
42-
env:
43-
VITE_BASE_PATH: /easy-portrait/
41+
run: npm run build -- --base "${{ steps.pages.outputs.base_path }}"
4442

4543
- name: Setup Pages
4644
uses: actions/configure-pages@v5

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import tailwindcss from '@tailwindcss/vite'
77

88
// https://vite.dev/config/
99
export default defineConfig({
10-
base: process.env.VITE_BASE_PATH || '/',
1110
plugins: [
1211
vue({
1312
template: {
@@ -20,6 +19,7 @@ export default defineConfig({
2019
tailwindcss(),
2120
],
2221
resolve: {
22+
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
2323
alias: {
2424
'@': fileURLToPath(new URL('./src', import.meta.url)),
2525
},

0 commit comments

Comments
 (0)