Running Hector Portfolio on your own machine requires only Node.js, npm, and Git. The project uses Webpack DevServer for a fast local development loop with hot reloading, and a singleDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/iwinser117/react-portafolio/llms.txt
Use this file to discover all available pages before exploring further.
npm run build command produces a fully optimized production bundle ready for deployment.
Prerequisites
Before you begin, make sure the following tools are installed:- Node.js 16 or higher — nodejs.org
- npm — ships with Node.js
- Git — git-scm.com
Setup Steps
Install dependencies
Install all Node.js dependencies declared in This will install both
package.json:dependencies (React, MUI, i18next, EmailJS, etc.) and devDependencies (Webpack, Babel loaders, plugins, etc.).Start the development server
Launch the Webpack DevServer in development mode:This runs
webpack server --config webpack.config.dev.js, which compiles the application, starts the dev server with hot reloading enabled, and opens your browser automatically.NPM Scripts
Thepackage.json defines three scripts for different stages of development and deployment:
| Script | Command | Description |
|---|---|---|
npm run local | webpack server --config webpack.config.dev.js | Starts Webpack DevServer with hot reloading on port 3007 |
npm run start | webpack --config webpack.config.dev.js | One-time build using the development Webpack config (no server) |
npm run build | webpack --mode production --config webpack.config.js | Production build with minification — outputs to dist/ |
Environment Variable: EmailJS Key
The contact form uses@emailjs/browser to send messages. It reads the service key from the Email_key environment variable, which is injected at build time via Webpack’s DefinePlugin.
Create a You can obtain your service key from the EmailJS dashboard. Without this variable, the contact form will not be able to send emails.
.env file in the project root before starting the dev server or running a build:Production Build
To generate a deployment-ready bundle, run:webpack.config.js, applying the following optimizations:
- CSS extraction and minification via
MiniCssExtractPluginandCssMinimizerWebpackPlugin - JavaScript minification via
TerserWebpackPlugin - Clean output directory via
CleanWebpackPlugin - Static assets copied to
dist/assets/
dist/ directory at the project root.
SPA Routing on Netlify
Thepublic/_redirects file ships with the following rule: