|
1 |
| -# Production Deployment {#production-deployment} |
| 1 | +# Rilascio in produzione {#rilascio-produzione} |
2 | 2 |
|
3 |
| -## Development vs. Production {#development-vs-production} |
| 3 | +## Sviluppo vs. Produzione {#sviluppo-vs-produzione} |
4 | 4 |
|
5 |
| -During development, Vue provides a number of features to improve the development experience: |
| 5 | +Durante lo sviluppo, Vue mette a disposizione un numero di funzionalità per migliorare l'esperienza di sviluppo nella sua interezza: |
6 | 6 |
|
7 |
| -- Warning for common errors and pitfalls |
8 |
| -- Props / events validation |
9 |
| -- [Reactivity debugging hooks](/guide/extras/reactivity-in-depth#reactivity-debugging) |
10 |
| -- Devtools integration |
| 7 | +- Avvisi per errori comuni ed incidenti di percorso |
| 8 | +- Props / validazione degli eventi |
| 9 | +- [hooks per la reattività del debugging](/guide/extras/reactivity-in-depth#reactivity-debugging) |
| 10 | +- Integrazione degli strumenti di sviluppo |
11 | 11 |
|
12 |
| -However, these features become useless in production. Some of the warning checks can also incur a small amount of performance overhead. When deploying to production, we should drop all the unused, development-only code branches for smaller payload size and better performance. |
| 12 | +Tuttavia, alcune di queste funzionalità diventano inutili in produzione. Alcuni avvisi di controllo possono andare incontro a piccoli costi riguardo le performance. Quando ci si prepara per il rilascio in produzione dovremmo abbandonare tutti i branch di solo sviluppo non utilizzati, affinchè si ottenga un carico delle suddette performance minore, per migliorarne la qualità. |
13 | 13 |
|
14 |
| -## Without Build Tools {#without-build-tools} |
| 14 | +## Senza strumenti di versionamento {#senza-strumenti-di-versione} |
15 | 15 |
|
16 |
| -If you are using Vue without a build tool by loading it from a CDN or self-hosted script, make sure to use the production build (dist files that end in `.prod.js`) when deploying to production. Production builds are pre-minified with all development-only code branches removed. |
| 16 | +Se ci si trova ad usare Vue senza strumenti di versionamento, ossia caricandolo da una CDN o da uno script autosufficiente, ci si raccomanda di usare il versionamento di produzione (file dist con nomenclatura `.prod.js`) in fase di rilascio. Le versioni di produzione sono pre-compresse (minified) con tutti i branch di sviluppo rimossi. |
17 | 17 |
|
18 |
| -- If using global build (accessing via the `Vue` global): use `vue.global.prod.js`. |
19 |
| -- If using ESM build (accessing via native ESM imports): use `vue.esm-browser.prod.js`. |
| 18 | +- Se si decide di usare il versionamento globale (accedendovi tramite la `Vue` global): usare `vue.global.prod.js`. |
| 19 | +- Se si decide di usare il versionamento ESM (accedendovi tramite gli import nativi ESM): utilizzare `vue.esm-browser.prod.js`. |
20 | 20 |
|
21 |
| -Consult the [dist file guide](https://github.com/vuejs/core/tree/main/packages/vue#which-dist-file-to-use) for more details. |
| 21 | +Consultare la [guida ai file dist](https://github.com/vuejs/core/tree/main/packages/vue#which-dist-file-to-use) per maggiori dettagli. |
22 | 22 |
|
23 |
| -## With Build Tools {#with-build-tools} |
| 23 | +## Con strumenti di versionamento {#con-strumenti-di-versione} |
24 | 24 |
|
25 |
| -Projects scaffolded via `create-vue` (based on Vite) or Vue CLI (based on webpack) are pre-configured for production builds. |
| 25 | +Progetti montati tramite `create-vue` (basati su Vite) o Vue CLI (basato su webpack) sono pre-configurati per versionamenti di produzione. |
26 | 26 |
|
27 |
| -If using a custom setup, make sure that: |
| 27 | +Se invece ci si trova a dover usare un'installazione personalizzata, si raccomanda di: |
28 | 28 |
|
29 |
| -1. `vue` resolves to `vue.runtime.esm-bundler.js`. |
30 |
| -2. The [compile time feature flags](https://github.com/vuejs/core/tree/main/packages/vue#bundler-build-feature-flags) are properly configured. |
31 |
| -3. <code>process.env<wbr>.NODE_ENV</code> is replaced with `"production"` during build. |
| 29 | +1. `vue` si trasforma in `vue.runtime.esm-bundler.js`. |
| 30 | +2. I [flag di funzionalità](https://github.com/vuejs/core/tree/main/packages/vue#bundler-build-feature-flags) sono correttamente configurati. |
| 31 | +3. <code>process.env<wbr>.NODE_ENV</code> è sostituito con `"production"` durante il versionamento. |
32 | 32 |
|
33 |
| -Additional references: |
| 33 | +Fonti addizionali: |
34 | 34 |
|
35 |
| -- [Vite production build guide](https://vitejs.dev/guide/build.html) |
36 |
| -- [Vite deployment guide](https://vitejs.dev/guide/static-deploy.html) |
37 |
| -- [Vue CLI deployment guide](https://cli.vuejs.org/guide/deployment.html) |
| 35 | +- [guida al versionamento in produzione di Vite](https://vitejs.dev/guide/build.html) |
| 36 | +- [guida di Vite riguardante il rilascio](https://vitejs.dev/guide/static-deploy.html) |
| 37 | +- [guida di Vue CLI riguardante il rilascio](https://cli.vuejs.org/guide/deployment.html) |
38 | 38 |
|
39 |
| -## Tracking Runtime Errors {#tracking-runtime-errors} |
| 39 | +## Seguire gli errori di runtime {#seguire-errori-runtime} |
40 | 40 |
|
41 |
| -The [app-level error handler](/api/application#app-config-errorhandler) can be used to report errors to tracking services: |
| 41 | +Lo strumento [gestore degli errori a livello di app](/api/application#app-config-errorhandler) può essere utilizzato per riferire suddetti errori agli assistenti al monitoraggio (degli errori): |
42 | 42 |
|
43 | 43 | ```js
|
44 | 44 | import { createApp } from 'vue'
|
45 | 45 |
|
46 | 46 | const app = createApp(...)
|
47 | 47 |
|
48 | 48 | app.config.errorHandler = (err, instance, info) => {
|
49 |
| - // report error to tracking services |
| 49 | + // riporta l'errore agli assistenti al monitoraggio errori |
50 | 50 | }
|
51 | 51 | ```
|
52 | 52 |
|
53 |
| -Services such as [Sentry](https://docs.sentry.io/platforms/javascript/guides/vue/) and [Bugsnag](https://docs.bugsnag.com/platforms/javascript/vue/) also provide official integrations for Vue. |
| 53 | +Tra questi assisenti di monitoraggio dell'errore abbiamo [Sentry](https://docs.sentry.io/platforms/javascript/guides/vue/) e [Bugsnag](https://docs.bugsnag.com/platforms/javascript/vue/) che a sua volta dispone di integrazione ufficiale per Vue. |
0 commit comments