Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Локализация docs/guide/recipes/vite-plugin.md #229

Merged
merged 5 commits into from
Jun 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/2.guide/4.recipes/2.vite-plugin.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
navigation.title: 'Vite Plugins'
title: Using Vite Plugins in Nuxt
description: Learn how to integrate Vite plugins into your Nuxt project.
navigation.title: 'Плагины Vite'
title: Использование плагинов Vite в Nuxt
description: Узнайте, как интегрировать плагины Vite в ваш проект Nuxt.
---

While Nuxt modules offer extensive functionality, sometimes a specific Vite plugin might meet your needs more directly.
Модули Nuxt предлагают широкие функциональные возможности, но иногда использование плагинов Vite может лучше удовлетворить ваши потребности.

First, we need to install the Vite plugin, for our example, we'll use `@rollup/plugin-yaml`:
Сначала нам необходимо установить плагин Vite, для нашего примера мы используем `@rollup/plugin-yaml`:

::code-group

Expand All @@ -28,7 +28,7 @@ First, we need to install the Vite plugin, for our example, we'll use `@rollup/p

::

Next, we need to import and add it to our [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file:
Далее нам нужно импортировать и добавить его в наш файл [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config):

```ts [nuxt.config.ts]
import yaml from '@rollup/plugin-yaml'
Expand All @@ -42,14 +42,14 @@ export default defineNuxtConfig({
})
```

Now we installed and configured our Vite plugin, we can start using YAML files directly in our project.
Теперь, когда мы установили и настроили плагин Vite, мы можем начать использовать YAML-файлы непосредственно в нашем проекте.

For example, we can have a `config.yaml` that stores configuration data and import this data in our Nuxt components:
Например, у нас есть файл `config.yaml`, в котором хранятся данные о конфигурации, мы можем импортировать эти данные в наши компоненты Nuxt:

::code-group

```yaml [data/hello.yaml]
greeting: "Hello, Nuxt with Vite!"
greeting: "Привет, Nuxt и Vite!"
```

```vue [components/Hello.vue]
Expand Down
Loading