以下是 package.json 的配置
{
"name": "react-search-photo",
"version": "0.0.0",
"homepage": "https://haha861924.github.io/react-search-photo",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"predeploy": "npm run build",
"deploy": "gh-pages -b main -d build"
},
"dependencies": {
"axios": "^0.25.0",
"gh-pages": "^3.2.3",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@vitejs/plugin-react": "^1.0.7",
"vite": "^2.7.2"
}
}
preview 可以看得到結果,但是部屬上去之後,打開網址沒辦法看到
會出這這個 error Failed to load resource: the server responded with a status of 404 () main.jsx
想請問有人遇過這個問題嗎?