Skip to content

Commit 496907f

Browse files
committed
fix vite on gh pages and more
1 parent bdd5e14 commit 496907f

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343
uses: peaceiris/actions-gh-pages@v3
4444
with:
4545
github_token: ${{ secrets.GITHUB_TOKEN }}
46-
publish_dir: ./dist
46+
publish_dir: ./example/dist

example/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/vite.config.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { defineConfig } from 'vite'
2-
import react from '@vitejs/plugin-react'
1+
import { defineConfig } from "vite";
2+
import react from "@vitejs/plugin-react";
33

44
// https://vite.dev/config/
55
export default defineConfig({
66
plugins: [react()],
7-
})
7+
base: "/react-top-loading-bar/",
8+
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"prepublishOnly": "npm run build",
2828
"test:build": "npm run build",
2929
"predeploy": "cd example && npm install && npm run build",
30-
"deploy": "gh-pages -d ./example/dist"
30+
"deploy": "gh-pages -d example/dist"
3131
},
3232
"peerDependencies": {
3333
"react": "^16 || ^17 || ^18 || ^19"

0 commit comments

Comments
 (0)