這是我的package.json
{
"name": "wang",
"homepage": "https://github.com/wang19903/web3.0",
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"predeploy": "npm run build",
"deploy": "gh-pages -d dist"
},
"dependencies": {
"@tailwindcss/forms": "^0.4.0",
"ethers": "^5.5.2",
"gh-pages": "^3.2.3",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-icons": "^4.3.1"
},
"devDependencies": {
"@vitejs/plugin-react": "^1.0.7",
"autoprefixer": "^10.4.1",
"postcss": "^8.4.5",
"tailwindcss": "^3.0.9",
"vite": "^2.7.2"
}
}
按照vite的步驟 https://vitejs.dev/guide/static-deploy.html#github-pages
無法成功開啟gh-page。
另外開兩個repo測試,一個是vite+react 依照 vite 文件的步驟成功開啟頁面,另外一個用npm creat-react-app gh-pages 也有成功開啟頁面
想了很久不知道為什麼無法開啟,還請給我一個方向,謝謝