Overview
Before deploying Tienda ETCA to production, you need to configure your build environment and ensure all dependencies are properly set up.Prerequisites
1
Node.js Installation
Ensure you have Node.js installed (version 18 or higher recommended):
2
Install Dependencies
Install all required dependencies from the project root:This will install all production and development dependencies including:
- React 19.0.0
- Vite 6.3.1
- React Router DOM
- Bootstrap and React Bootstrap
- Additional UI libraries (React Icons, SweetAlert2, React Toastify)
Vite Configuration
The application uses Vite as the build tool with a minimal configuration:The default Vite configuration is sufficient for most deployment scenarios. Vite automatically optimizes the build for production.
Environment Variables
If your application requires environment variables:- Create a
.env.productionfile in the project root - Add variables with the
VITE_prefix to make them accessible in your app:
- Access them in your code:
Build Verification
Before deploying, verify that your application builds successfully:dist/ directory.
The build process includes:
- JavaScript bundling and minification
- CSS optimization
- Asset optimization
- Tree-shaking to remove unused code
Production Testing
Test the production build locally before deploying:http://localhost:4173.
Next Steps
Once your setup is complete and verified:- Proceed to Building for Production
- Choose your Hosting Platform