장바구니에 상품이 없습니다.
home2 › 게시판 › React 게시판 › build파일이 생성이 안되는데 dist파일로 해봣더니 404 떠여
{ "name": "blog_react", "private": true, "version": "0.0.0", "type": "module", "homepage": "https://simmini.github.io/blog_react/", "scripts": { "dev": "vite", "build": "vite build", "lint": "eslint .", "preview": "vite preview", "predeploy": "npm run build", "deploy": "gh-pages -d build" }, "dependencies": { "gh-pages": "^6.3.0", "react": "^18.3.1", "react-dom": "^18.3.1" }, "devDependencies": { "@eslint/js": "^9.17.0", "@types/react": "^18.3.18", "@types/react-dom": "^18.3.5", "@vitejs/plugin-react": "^4.3.4", "eslint": "^9.17.0", "eslint-plugin-react": "^7.37.2", "eslint-plugin-react-hooks": "^5.0.0", "eslint-plugin-react-refresh": "^0.4.16", "globals": "^15.14.0", "vite": "^6.0.5" } }
==============
import { defineConfig } from 'vite' import react from '@vitejs/plugin-react'
// https://vite.dev/config/ export default defineConfig({ plugins: [react()], }) 안되는데 왜 안되는걸까여??빌드하면 dist파일만 생겨서 그파일 자체를 깃허브에 파일 업로드한건데,,,
index.html 파일에 css js 파일링크 경로가 어떻게 되어있나 확인해봅시다
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <link rel="icon" type="image/svg+xml" href="/vite.svg" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Vite + React</title> </head> <body> <div id="root"></div> <script type="module" src="/src/main.jsx"></script> </body> </html>
=============================================================
index.html에 css,js파일 링크 경로가 딱히 안보입니다.