You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/docs/optimizing-performance.md
+24-26Lines changed: 24 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -24,70 +24,68 @@ Si visitas un sitio con React en modo de desarrollo, el ícono tendrá un fondo
24
24
25
25
Se espera que uses el modo de desarrollo cuando estás trabajando en tu aplicación, y el modo de producción cuando despliegues tu aplicación a los usuarios.
26
26
27
-
You can find instructions for building your app for production below.
27
+
Abajo puedes encontrar las instrucciones para construir tu aplicación de producción.
28
28
29
29
### Create React App
30
30
31
-
If your project is built with[Create React App](https://github.com/facebookincubator/create-react-app), run:
31
+
Si tu proyecto fui construido con[Create React App](https://github.com/facebookincubator/create-react-app), ejecuta:
32
32
33
33
```
34
34
npm run build
35
35
```
36
36
37
-
This will create a production build of your app in the `build/`folder of your project.
37
+
Esto creará una *build* de producción de tu aplicación el directorio `build/`de tu proyecto.
38
38
39
-
Remember that this is only necessary before deploying to production. For normal development, use`npm start`.
39
+
Recuerda que esto es solo una necesidad antes de desplegar a producción. Para el desarrollo normal, usa`npm start`.
40
40
41
41
### Single-File Builds
42
42
43
-
We offer production-ready versions of React and React DOM as single files:
43
+
Ofrecemos versiones listas para producción de React y React DOM como un archivo:
Remember that only React files ending with `.production.min.js`are suitable for production.
50
+
Recuerda que solo los archivos de React que terminan con `production.min.js`son apropiados para producción.
51
51
52
52
### Brunch
53
53
54
-
For the most efficient Brunch production build, install the [`uglify-js-brunch`](https://github.com/brunch/uglify-js-brunch) plugin:
54
+
Para la *build* de producción Brunch más eficiente, instala el plugin [`uglify-js-brunch`](https://github.com/brunch/uglify-js-brunch):
55
55
56
56
```
57
-
# If you use npm
57
+
# Si usas npm
58
58
npm install --save-dev uglify-js-brunch
59
59
60
-
# If you use Yarn
60
+
# Si usas Yarn
61
61
yarn add --dev uglify-js-brunch
62
62
```
63
63
64
-
Then, to create a production build, add the `-p`flag to the `build` command:
64
+
Entonces, para crear una *build* de producción, agrega la bandera `-p`al comando `build`:
65
65
66
66
```
67
67
brunch build -p
68
68
```
69
-
70
-
Remember that you only need to do this for production builds. You shouldn't pass the `-p` flag or apply this plugin in development, because it will hide useful React warnings and make the builds much slower.
69
+
Recuerda que solo necesitas hacer esto para las *build* de producción. Tú no deberías pasar la bandera `-p` o aplicar el plugin en desarrollo, por que ocultará las advertencias de React y hará las *builds* mucho mas lentas.
71
70
72
71
### Browserify
73
72
74
-
For the most efficient Browserify production build, install a few plugins:
73
+
Para la *build* de producción con Browserify más eficiente, instala algunos plugins:
75
74
76
75
```
77
-
# If you use npm
76
+
# Si usas npm
78
77
npm install --save-dev envify uglify-js uglifyify
79
78
80
-
# If you use Yarn
79
+
# Si usas Yarn
81
80
yarn add --dev envify uglify-js uglifyify
82
81
```
82
+
Para crear una *build* de producción, asegúrate de agregar estas transformaciones **(El orden es importante)**:
83
83
84
-
To create a production build, make sure that you add these transforms **(the order matters)**:
85
-
86
-
* The [`envify`](https://github.com/hughsk/envify) transform ensures the right build environment is set. Make it global (`-g`).
87
-
* The [`uglifyify`](https://github.com/hughsk/uglifyify) transform removes development imports. Make it global too (`-g`).
88
-
* Finally, the resulting bundle is piped to [`uglify-js`](https://github.com/mishoo/UglifyJS2) for mangling ([read why](https://github.com/hughsk/uglifyify#motivationusage)).
84
+
* La transformación [`envify`](https://github.com/hughsk/envify) asegura que el ambiente de la *build* sea correcto. Hazlo lo global (`-g`).
85
+
* La transformación [`uglifyify`](https://github.com/hughsk/uglifyify) remueve los import de desarollo. Hazlo global tambien (`-g`).
86
+
* Finalmente, el *bundle* resultante es canalizado a [`uglify-js`](https://github.com/mishoo/UglifyJS2) para mutilar ([Lee porque](https://github.com/hughsk/uglifyify#motivationusage)).
89
87
90
-
For example:
88
+
Por ejemplo:
91
89
92
90
```
93
91
browserify ./index.js \
@@ -96,16 +94,16 @@ browserify ./index.js \
96
94
| uglifyjs --compress --mangle > ./bundle.js
97
95
```
98
96
99
-
>**Note:**
97
+
>**Nota:**
100
98
>
101
-
>The package name is `uglify-js`, but the binary it provides is called`uglifyjs`.<br>
102
-
>This is not a typo.
99
+
>El nombre del paquete es `uglify-js`, pero el binario que proporciona se llama`uglifyjs`.<br>
100
+
>Estoy no es un error de imprenta.
103
101
104
-
Remember that you only need to do this for production builds. You shouldn't apply these plugins in development because they will hide useful React warnings, and make the builds much slower.
102
+
Recuerda que solo necesitas hacer esto para las *builds* de producción. No deberías aplicar estos plugins en desarrollo por que ocultaran las advertencias de React, y haran las *builds* mucho mas lentas.
105
103
106
104
### Rollup
107
105
108
-
For the most efficient Rollup production build, install a few plugins:
106
+
Para el *Rollup* de la *build* de producción mas eficiente, instala algunos plugins:
0 commit comments