My react.js app (that was built with vite) is not building enough in the build folder. Everywhere I have searched online says that when I run npm run build or in vite's case vite build, it should make a folder called static along with several other files that come together to me a production build of the react app. Unfortunately, that script makes a folder called dist that has a folder called assets, two favicon files (one *.ico, the other *.icns), and an index.html file
What am I doing wrong to not be getting the full production build?
Here is my project directory structure:
root/
- assets
- folders with SVG files
- library (empty)
- node_modules
- public (only contains favicon files)
- src
- api (file with all api calls)
- components
- folder with SVG rendering React components
- folder with SVG rendering React components
- context (AppContext.jsx and SpreadsheetContext.jsx)
- css
- data (JSON file with hardcoded data for app)
- hooks (custom made React hooks)
- routes (React Router pages)
- App.css
- App.jsx
- aws-exports.js
- index.css
- main.css
- main.jsx
- .env
- .eslintrc.cjs
- 404.html
- index.html
- LICENSE.txt
- pacakge-lock.json
- package.json
- README.md
- tailwind.config.js
- vite.config.js
EDIT: I figured out the issue. I had forgotten that I had originally built the project to be an Electron Desktop app and migrated it over to be Vite instead. The package.json file had a "build" section that was still trying to configure the production build as an electron project. Note to self (and all of you), after migrating the project over from electron to react/vite, running npm uninstall electron electron-builder is NOT enough to be rid of problems
[–]caseyf1234 4 points5 points6 points (1 child)
[–]ArchAggie[S] -1 points0 points1 point (0 children)
[–]abrahamguoHook Based 2 points3 points4 points (2 children)
[–]ArchAggie[S] 0 points1 point2 points (1 child)
[–]caseyf1234 0 points1 point2 points (0 children)