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: add package.json setup #2052

Merged
merged 1 commit into from
May 9, 2023
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
10 changes: 10 additions & 0 deletions docs/content/1.getting-started/1.setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ pnpm add @nuxtjs/i18n@next --save-dev
```
::

## `package.json`

Then, you need to add `"type": "module"` to `package.json` of your nuxt project.

::alert{type="info"}
This is necessary because nitro prerender is used for the dynamic import of nuxt i18n config and i18n resources on the Node runtime, on nuxt build.
::

## `nuxt.config.ts`

Then, add `@nuxtjs/i18n` to the `modules` section in your `nuxt.config`. You can use either of the following ways to specify the module options:

```ts {}[nuxt.config.ts]
Expand Down