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
description: "Nuxt 3.7 is out, bringing a new CLI, native web streams and response, rendering optimisations, async context support - and much more."
3
+
description: "Вышел Nuxt 3.7 с новым CLI, нативными веб-стримами и ответами, оптимизацией рендеринга, поддержкой асинхронного контекста и многим другим"
4
4
navigation: false
5
5
image: /assets/blog/v3.7.png
6
6
authors:
@@ -12,27 +12,27 @@ date: 2023-08-25
12
12
category: Релиз
13
13
---
14
14
15
-
### 🐣 A New CLI
15
+
### 🐣 Новый CLI
16
16
17
-
We've refactored`nuxi`using[unjs/citty](http://github.com/unjs/citty) and this marks the first Nuxt release that depends on the new version, safely in its own repository. We have grand plans for this - check out some of the features + roadmap discussions in [nuxt/cli](https://github.com/nuxt/cli)and please feel free to contribute!
17
+
Мы переделали`nuxi`используя[unjs/citty](http://github.com/unjs/citty), и это первый релиз Nuxt, который зависит от новой версии, безопасно в своем собственном репозитории. У нас есть грандиозные планы на этот счет — ознакомьтесь с некоторыми функциями + обсуждениями дорожной карты в [nuxt/cli](https://github.com/nuxt/cli)и, пожалуйста, не стесняйтесь вносить свой вклад!
Nuxi is now decoupled from the main `nuxt`version - we plan to iterate and release nuxi more quickly in future so you can expect new things coming soon!
23
+
Nuxi теперь отделена от основной версии `nuxt`- мы планируем в будущем быстрее обновлять и выпускать nuxi, так что вы можете ожидать новых вещей в ближайшее время!
24
24
25
-
### 🕸️ Native Web Streams and`Response`
25
+
### 🕸️ Нативные веб-стримы и`Response`
26
26
27
-
With improvements in[unjs/h3](https://github.com/unjs/h3)and[unjs/nitro](https://github.com/unjs/nitro), it's now possible to directly return a `Response`object from server routes, meaning it's _also_ possible to return and handle streams natively in Nuxt.
27
+
Благодаря улучшениям в[unjs/h3](https://github.com/unjs/h3)и[unjs/nitro](https://github.com/unjs/nitro) теперь можно напрямую возвращать объект `Response`из серверных маршрутов, что означает _также_ возможность возвращать и обрабатывать стримы нативно.
28
28
29
-
👉 Check out the full detail in the [unjs/h3](https://github.com/unjs/h3/releases)and[unjs/nitro](https://github.com/unjs/nitro/releases) release notes.
29
+
👉 Подробную информацию смотрите в описании релизов [unjs/h3](https://github.com/unjs/h3/releases)и[unjs/nitro](https://github.com/unjs/nitro/releases).
30
30
31
-
### 🔥 HTML Rendering Optimisations
31
+
### 🔥 Оптимизация рендеринга HTML
32
32
33
-
This release comes with a couple of improvements in rendering HTML responses from the server. We now determine whether to preload/prefetch resources at build time (so you can customise this in the`build:manifest` hook). We also now manage rendering the HTML for them directly in`unhead` ([#22179](https://github.com/nuxt/nuxt/pull/22179)), which means you can configure the_order_for`<link>`, `<meta>`, `<script>`, `<style>`, and more. And - in our preliminary testing - it's even faster!
33
+
Этот релиз поставляется с парой улучшений в рендеринге HTML-ответов с сервера. Теперь мы определяем, следует ли предварительно загружать/предварительно извлекать ресурсы во время сборки (чтобы вы могли настроить это в хуке`build:manifest`). Теперь мы также управляем рендерингом HTML для них непосредственно в`unhead` ([#22179](https://github.com/nuxt/nuxt/pull/22179)), что означает, что вы можете настроить_order_для`<link>`, `<meta>`, `<script>`, `<style>` и т.д. И - в нашем предварительном тестировании - это стало еще быстрее!
34
34
35
-
It's possible to opt-in to upcoming head improvements with the`experimental.headNext` flag. This currently includes a new ordering algorithm based on [capo.js](https://github.com/rviscomi/capo.js) ([#22431](https://github.com/nuxt/nuxt/pull/22431)) and allows enabling future optimisations as they are released in`unhead`:
35
+
Можно подписаться на предстоящие улучшения head с помощью флага`experimental.headNext`. В настоящее время он включает новый алгоритм упорядочивания на основе [capo.js](https://github.com/rviscomi/capo.js) ([#22431](https://github.com/nuxt/nuxt/pull/22431)) и позволяет включать будущие оптимизации по мере их выпуска в`unhead`:
We'd love your thoughts - you can respond with any issues/feedback in [this discussion](https://github.com/nuxt/nuxt/discussions/22632).
45
+
Мы будем рады услышать ваши мысли. Вы можете ответить на любые вопросы/отзывы в [этом обсуждении](https://github.com/nuxt/nuxt/discussions/22632).
46
46
47
-
### 🛠️ Build Environment Shortcuts
47
+
### 🛠️ Сокращения для настройки окружения сборки
48
48
49
-
In your Nuxt config you can now use `$client`and`$server` shortcuts to easily define configuration that is specific to just the Vite client/server ([#22302](https://github.com/nuxt/nuxt/pull/22302)) or webpack client/server ([#22304](https://github.com/nuxt/nuxt/pull/22304)) builds. This previously was only possible with the `vite:extendConfig`and`webpack:config` hooks.
49
+
В конфигурации Nuxt теперь можно использовать сокращения `$client`и`$server`, чтобы легко определить конфигурацию, специфичную только для сборок клиента/сервера Vite ([#22302](https://github.com/nuxt/nuxt/pull/22302)) или клиента/сервера webpack ([#22304](https://github.com/nuxt/nuxt/pull/22304)). Ранее это было возможно только с помощью хуков `vite:extendConfig`и`webpack:config`.
We've chosen to unpin Vite from minor versions, meaning whenever Vite releases a new feature version you can opt-in straight away. Vite 4.4 brings a lot of exciting things, including experimental Lightning CSS support - and much more!
73
+
Мы решили открепить Vite от минорных версий, то есть, когда Vite выпускает новую версию функции, вы можете сразу же подключиться к ней. Vite 4.4 приносит много интересных вещей, включая экспериментальную поддержку Lightning CSS — и многое другое!
74
74
75
-
👉 Check out the [Vite release notes](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md#440-2023-07-06) for more.
75
+
👉 Более подробную информацию можно найти в [заметках о выпуске Vite](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md#440-2023-07-06).
76
76
77
-
### 💪 TypeScript Updates
77
+
### 💪 Обновления TypeScript
78
78
79
-
We now use purely relative paths in the generated `tsconfig.json`instead of setting a `baseUrl`. This means better support for dev environments like docker images where the absolute path may not match your IDE ([#22410](https://github.com/nuxt/nuxt/pull/22410)).
79
+
Теперь мы используем чистые относительные пути в сгенерированном `tsconfig.json`вместо установки `baseUrl`. Это означает лучшую поддержку для сред разработки, таких как образы docker, где абсолютный путь может не соответствовать вашей IDE ([#22410](https://github.com/nuxt/nuxt/pull/22410)).
80
80
81
-
We also set a couple of additional compiler flag defaults to match Vite/TS recommendations ([#22468](https://github.com/nuxt/nuxt/pull/22468)).
81
+
Мы также установили несколько дополнительных флагов компилятора по умолчанию для соответствия рекомендациям Vite/TS ([#22468](https://github.com/nuxt/nuxt/pull/22468)).
82
82
83
-
Plus, you should now get type hinted access to layouts in `setPageLayout` and also in`<NuxtLayout name>` ([#22363](https://github.com/nuxt/nuxt/pull/22362)).
83
+
Кроме того, теперь вы должны получить доступ к подсказками типов к лейаутам в `setPageLayout`, а также в`<NuxtLayout name>` ([#22363](https://github.com/nuxt/nuxt/pull/22362)).
84
84
85
-
### 🦄 Async Context support
85
+
### 🦄 Поддержка асинхронного контекста
86
86
87
-
If you've ever got an issue with 'Nuxt context unavailable' this might be one for you. We now support native async context for Bun and Node under an experimental flag, in both Nuxt and Nitro ([#20918](https://github.com/nuxt/nuxt/pull/20918)).
87
+
Если у вас когда-либо возникала проблема с 'Nuxt context unavailable', то это может вам помочь. Теперь мы поддерживаем собственный асинхронный контекст для Bun и Node под экспериментальным флагом, как в Nuxt, так и в Nitro ([#20918](https://github.com/nuxt/nuxt/pull/20918)).
88
88
89
-
This enables using Nuxt composables on the server _without_ needing to ensure they are being called directly in a setup function. It also allows the same in Nitro, with a new`useEvent()` utility that is usable in server routes.
89
+
Это позволяет использовать Nuxt композаблы на сервере _без_ необходимости обеспечивать их прямой вызов в setup-функции. Это также позволяет делать то же самое в Nitro с новой утилитой`useEvent()`, которую можно использовать в маршрутах сервера.
90
90
91
-
To try it out, you can enable`experimental.asyncContext`:
91
+
Чтобы попробовать, вы можете включить`experimental.asyncContext`:
We've fixed a couple of issues with watchers, meaning that you should need to restart your server less often - and you should see a significant performance increase if you are using layers.
103
+
Мы исправили несколько проблем с наблюдателями, а это значит, что вам придется реже перезапускать сервер, а также вы увидите значительное увеличение производительности, если используете слои.
104
104
105
105
### ⚗️ Nitro 2.6
106
106
107
-
There lots more exciting features coming directly from Nitro 2.6, including smaller, lighter servers and new persistent data storage in a `.data` directory.
107
+
В Nitro 2.6 появилось еще множество интересных функций, в том числе более компактные и легкие серверы, а также новое постоянное хранилище данных в директории `.data`.
108
108
109
-
👉 Read more in [the full release article](https://unjs.io/blog/2023-08-25-nitro-2.6).
109
+
👉 Подробнее читайте в [полной статье о релизе](https://unjs.io/blog/2023-08-25-nitro-2.6).
110
110
111
-
## ✅ Upgrading
111
+
## ✅ Обновление
112
112
113
-
As usual, our recommendation for upgrading is to run:
113
+
Как обычно, мы рекомендуем выполнить обновление следующим образом:
114
114
115
115
```sh
116
116
npx nuxi upgrade --force
117
117
```
118
118
119
-
This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the[unjs](https://github.com/unjs) ecosystem.
119
+
Это также обновит ваш lockfile и обеспечит получение обновлений из других зависимостей, на которые опирается Nuxt, особенно в экосистеме[unjs](https://github.com/unjs).
120
120
121
121
122
-
## 📃 Full changelog
122
+
## 📃 Полный список изменений
123
123
124
-
Read the full release notes onhttps://github.com/nuxt/nuxt/releases/tag/v3.7.0
124
+
Читайте полное описание релизаhttps://github.com/nuxt/nuxt/releases/tag/v3.7.0
0 commit comments