Build Process
Tienda ETCA uses Vite for building the production-ready application. The build process optimizes your code for performance and creates static assets ready for deployment.Production Build
1
Run the Build Command
Execute the build script defined in This runs
package.json:vite build which:- Bundles all JavaScript and CSS files
- Minifies and optimizes code
- Processes and optimizes assets
- Generates source maps
- Creates a production-ready
dist/directory
2
Verify Build Output
After a successful build, check the You should see:
dist/ directory:index.html- Main HTML entry pointassets/- Optimized JavaScript, CSS, and other assetsvite.svg- Static assets from thepublic/directory_redirects- Routing configuration for SPAs
Build Output Structure
Vite automatically adds content hashes to filenames (e.g.,
index-abc123.js) to enable efficient browser caching and cache busting.Build Optimization
Vite automatically applies several optimizations:Code Splitting
Vite intelligently splits your code into smaller chunks for faster loading:- Vendor dependencies are separated from application code
- Dynamic imports create separate chunks
- React Router routes can be lazy-loaded
Tree Shaking
Unused code is automatically removed from the final bundle, reducing file size.Asset Optimization
- Images and fonts are optimized
- CSS is minified and purged of unused styles
- JavaScript is minified using esbuild
Available Scripts
Frompackage.json:
Script Descriptions
Build Troubleshooting
Common Issues
Out of Memory ErrorsBuild Performance
Typical build times for Tienda ETCA:- Initial build: 10-30 seconds
- Subsequent builds: 5-15 seconds
Build times depend on your hardware, the number of dependencies, and the size of your application.
Next Steps
After successfully building your application:- Deploy to a hosting platform
- Set up continuous deployment with Git integration
- Configure custom domains and SSL certificates