forked from nuxt/nuxt
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(docs) Перевод Migration * Update docs/7.migration/5.plugins-and-middleware.md Co-authored-by: Artem <90565172+Hekikai@users.noreply.github.com> * Update docs/7.migration/8.runtime-config.md Co-authored-by: Artem <90565172+Hekikai@users.noreply.github.com> * Update docs/7.migration/8.runtime-config.md Co-authored-by: Artem <90565172+Hekikai@users.noreply.github.com> * Update docs/7.migration/8.runtime-config.md Co-authored-by: Artem <90565172+Hekikai@users.noreply.github.com> * Update docs/7.migration/10.bundling.md Co-authored-by: Artem <90565172+Hekikai@users.noreply.github.com> * Update docs/7.migration/11.server.md Co-authored-by: Artem <90565172+Hekikai@users.noreply.github.com> * Update docs/7.migration/3.auto-imports.md Co-authored-by: Artem <90565172+Hekikai@users.noreply.github.com> * Update docs/7.migration/3.auto-imports.md Co-authored-by: Artem <90565172+Hekikai@users.noreply.github.com> * Update docs/7.migration/5.plugins-and-middleware.md Co-authored-by: Artem <90565172+Hekikai@users.noreply.github.com> * feat(docs) Исправил замечания после ревью --------- Co-authored-by: Ivan Bochkarev <ibochkarev@uma.tech> Co-authored-by: Artem <90565172+Hekikai@users.noreply.github.com>
- Loading branch information
1 parent
d8b5d71
commit b568f4c
Showing
13 changed files
with
79 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
--- | ||
title: Build Tooling | ||
description: 'Learn how to migrate from Nuxt 2 to Nuxt 3 build tooling.' | ||
title: Инструменты сборки | ||
description: 'Узнайте, как мигрировать инструменты сборки Nuxt 2 на инструменты сборки Nuxt 3.' | ||
--- | ||
|
||
We use the following build tools by default: | ||
По умолчанию мы используем следующие инструменты сборки: | ||
|
||
- [Vite](https://vitejs.dev) or [webpack](https://webpack.js.org) | ||
- [Vite](https://vitejs.dev) или [webpack](https://webpack.js.org) | ||
- [Rollup](https://rollupjs.org) | ||
- [PostCSS](https://postcss.org) | ||
- [esbuild](https://esbuild.github.io) | ||
|
||
For this reason, most of your previous `build` configuration in `nuxt.config` will now be ignored, including any custom babel configuration. | ||
По этой причине, большая часть вашей предыдущей конфигурации `build` в `nuxt.config` теперь будет игнорироваться, включая любую настраиваемую конфигурацию babel. | ||
|
||
If you need to configure any of Nuxt's build tools, you can do so in your `nuxt.config`, using the new top-level `vite`, `webpack` and `postcss` keys. | ||
Если вам необходимо настроить любые инструменты сборки Nuxt, вы можете сделать это в вашем `nuxt.config`, используя новые ключи верхнего уровня `vite`, `webpack` и `postcss`. | ||
|
||
In addition, Nuxt ships with TypeScript support. | ||
Кроме того, Nuxt поставляется с поддержкой TypeScript. | ||
|
||
:read-more{to="/docs/guide/concepts/typescript"} | ||
|
||
## Steps | ||
## Шаги | ||
|
||
1. Remove `@nuxt/typescript-build` and `@nuxt/typescript-runtime` from your dependencies and modules. | ||
2. Remove any unused babel dependencies from your project. | ||
3. Remove any explicit core-js dependencies. | ||
4. Migrate `require` to `import`. | ||
1. Удалите `@nuxt/typescript-build` и `@nuxt/typescript-runtime` из ваших зависимостей и модулей. | ||
2. Удалите любые неиспользуемые зависимости babel из вашего проекта. | ||
3. Удалите любые явные зависимости `core-js`. | ||
4. Замените `require` на `import`. | ||
|
||
<!-- TODO: Enabling webpack builder --> | ||
<!-- TODO: Включение конструктора webpack --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
--- | ||
title: Server | ||
description: 'Learn how to migrate from Nuxt 2 to Nuxt 3 server.' | ||
title: Сервер | ||
description: 'Узнайте, как мигрировать сервер Nuxt 2 на сервер Nuxt 3.' | ||
--- | ||
|
||
In a built Nuxt 3 application, there is no runtime Nuxt dependency. That means your site will be highly performant, and ultra-slim. But it also means you can no longer hook into runtime Nuxt server hooks. | ||
В собранном приложении Nuxt 3 отсутствует зависимость от Nuxt runtime. Это означает, что ваш сайт будет высокопроизводительным и сверхкомпактным. Но это также означает, что вы больше не можете использовать хуки сервера Nuxt runtime. | ||
|
||
:read-more{to="/docs/guide/concepts/server-engine"} | ||
|
||
## Steps | ||
## Шаги | ||
|
||
1. Remove the `render` key in your `nuxt.config`. | ||
2. Any files in `~/server/api` and `~/server/middleware` will be automatically registered; you can remove them from your `serverMiddleware` array. | ||
3. Update any other items in your `serverMiddleware` array to point to files or npm packages directly, rather than using inline functions. | ||
1. Удалите ключ `render` в вашем `nuxt.config`. | ||
2. Все файлы в `~/server/api` и `~/server/middleware` будут автоматически зарегистрированы, вы можете удалить их из вашего массива `serverMiddleware`. | ||
3. Обновите любые другие элементы в вашем массиве `serverMiddleware`, чтобы они указывали на файлы или пакеты npm напрямую, а не использовали встроенные функции. | ||
|
||
:read-more{to="/docs/guide/directory-structure/server"} | ||
:read-more{to="/docs/guide/going-further/hooks#server-hooks-runtime"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
--- | ||
title: Auto Imports | ||
description: Nuxt 3 adopts a minimal friction approach, meaning wherever possible components and composables are auto-imported. | ||
title: Автоматические импорты | ||
description: Nuxt 3 применяет подход с минимальными сложностями, что означает, что где это возможно, компоненты и композаблы автоматически импортируются. | ||
--- | ||
|
||
::note | ||
In the rest of the migration documentation, you will notice that key Nuxt and Vue utilities do not have explicit imports. This is not a typo; Nuxt will automatically import them for you, and you should get full type hinting if you have followed [the instructions](/docs/migration/configuration#typescript) to use Nuxt's TypeScript support. | ||
В остальной документации по миграции вы заметите, что ключевые утилиты Nuxt и Vue не имеют явных импортов. Это не опечатка; Nuxt автоматически импортирует их для вас, и вы должны получить полные подсказки типов, если вы следовали [инструкциям](/docs/migration/configuration#typescript) по использованию поддержки TypeScript в Nuxt. | ||
:: | ||
|
||
[Read more about auto imports](/docs/guide/concepts/auto-imports) | ||
[Подробнее об автоматических импортах](/docs/guide/concepts/auto-imports) | ||
|
||
## Migration | ||
## Миграция | ||
|
||
1. If you have been using `@nuxt/components` in Nuxt 2, you can remove `components: true` in your `nuxt.config`. If you had a more complex setup, then note that the component options have changed somewhat. See the [components documentation](/docs/guide/directory-structure/components) for more information. | ||
1. Если вы использовали `@nuxt/components` в Nuxt 2, вы можете удалить `components: true` в своем `nuxt.config`. Если у вас была более сложная настройка, то обратите внимание, что опции компонентов немного изменились. Подробнее см. в [документации по компонентам](/docs/guide/directory-structure/components). | ||
|
||
::tip | ||
You can look at `.nuxt/types/components.d.ts` and `.nuxt/types/imports.d.ts` to see how Nuxt has resolved your components and composable auto-imports. | ||
Вы можете посмотреть `.nuxt/types/components.d.ts` и `.nuxt/types/imports.d.ts` чтобы увидеть, как Nuxt разрешил ваши компоненты и автоматические импорты композаблов. | ||
:: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.