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: rename 3.nuxt.config.md to 3.nuxt-config.md #23819

Merged
merged 4 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/1.getting-started/10.deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ Nuxt 3 can be deployed to several cloud providers with a minimal amount of confi

In addition to Node.js servers and static hosting services, a Nuxt 3 project can be deployed with several well-tested presets and minimal amount of configuration.

You can explicitly set the desired preset in the [`nuxt.config`](/docs/guide/directory-structure/nuxt.config) file:
You can explicitly set the desired preset in the [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file:

```js [nuxt.config.ts]
export default {
Expand Down
2 changes: 1 addition & 1 deletion docs/1.getting-started/2.installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Start with one of our starters and themes directly by opening [nuxt.new](https:/
- **Nuxtr**: Install the community-developed [Nuxtr extension](https://marketplace.visualstudio.com/items?itemName=Nuxtr.nuxtr-vscode)
- **Volar**: Either enable [**Take Over Mode**](https://vuejs.org/guide/typescript/overview.html#volar-takeover-mode) (recommended) or add the [TypeScript Vue Plugin](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin)

If you have enabled **Take Over Mode** or installed the **TypeScript Vue Plugin (Volar)**, you can disable generating the shim for `*.vue` files in your [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) file:
If you have enabled **Take Over Mode** or installed the **TypeScript Vue Plugin (Volar)**, you can disable generating the shim for `*.vue` files in your [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file:

```ts [nuxt.config.ts]
export default defineNuxtConfig({
Expand Down
6 changes: 3 additions & 3 deletions docs/1.getting-started/3.configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ navigation.icon: i-ph-gear-duotone
---


By default, Nuxt is configured to cover most use cases. The [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) file can override or extend this default configuration.
By default, Nuxt is configured to cover most use cases. The [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file can override or extend this default configuration.

## Nuxt Configuration

The [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) file is located at the root of a Nuxt project and can override or extend the application's behavior.
The [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file is located at the root of a Nuxt project and can override or extend the application's behavior.

A minimal configuration file exports the `defineNuxtConfig` function containing an object with your configuration. The `defineNuxtConfig` helper is globally available without import.

Expand Down Expand Up @@ -135,7 +135,7 @@ Non primitive JS types | ❌ No | βœ… Yes

## External Configuration Files

Nuxt uses [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) file as the single source of trust for configurations and skips reading external configuration files. During the course of building your project, you may have a need to configure those. The following table highlights common configurations and, where applicable, how they can be configured with Nuxt.
Nuxt uses [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file as the single source of trust for configurations and skips reading external configuration files. During the course of building your project, you may have a need to configure those. The following table highlights common configurations and, where applicable, how they can be configured with Nuxt.

Name | Config File | How To Configure
|----------------------------------------------|---------------------------|-------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/1.getting-started/5.seo-meta.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default defineNuxtConfig({
})
```

Providing an [`app.head`](/docs/api/nuxt-config#head) property in your [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) allows you to customize the head for your entire app.
Providing an [`app.head`](/docs/api/nuxt-config#head) property in your [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) allows you to customize the head for your entire app.

::callout
This method does not allow you to provide reactive data. We recommend to use `useHead()` in `app.vue`.
Expand Down
2 changes: 1 addition & 1 deletion docs/1.getting-started/9.layers.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ One of the core features of Nuxt 3 is the layers and extending support. You can

## Usage

You can extend a layer by adding the [extends](/docs/api/nuxt-config#extends) property to the [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) file.
You can extend a layer by adding the [extends](/docs/api/nuxt-config#extends) property to the [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file.

```ts [nuxt.config.ts]
export default defineNuxtConfig({
Expand Down
2 changes: 1 addition & 1 deletion docs/2.guide/1.concepts/5.modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Explore Nuxt Modules

## Add Nuxt Modules

Once you have installed the modules you can add them to your [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) file under the `modules` property. Module developers usually provide additional steps and details for usage.
Once you have installed the modules you can add them to your [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file under the `modules` property. Module developers usually provide additional steps and details for usage.

```ts [nuxt.config.ts]
export default defineNuxtConfig({
Expand Down
2 changes: 1 addition & 1 deletion docs/2.guide/2.directory-structure/1.modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The auto-registered files patterns are:
- `modules/*/index.ts`
- `modules/*.ts`

You don't need to add those local modules to your [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) separately.
You don't need to add those local modules to your [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) separately.

::code-group

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export default defineNuxtConfig({
})
```


::callout
`defineNuxtConfig` helper is globally available without import.
::
Expand All @@ -34,7 +33,6 @@ Discover all the available options in the **Nuxt configuration** documentation.

To ensure your configuration is up to date, Nuxt will make a full restart when detecting changes in the main configuration file, the [`.env`](/docs/guide/directory-structure/env), [`.nuxtignore`](/docs/guide/directory-structure/nuxtignore) and `.nuxtrc` dotfiles.


The `.nuxtrc` file is a file that can be used to configure Nuxt with a fla syntax, it is based on [`unjs/rc9`](https://github.com/unjs/rc9).

``` [.nuxtrc]
Expand Down
2 changes: 1 addition & 1 deletion docs/2.guide/3.going-further/10.runtime-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: "Nuxt provides a runtime config API to expose configuration and sec

## Exposing

To expose config and environment variables to the rest of your app, you will need to define runtime configuration in your `nuxt.config` file, using the [`runtimeConfig`](/docs/guide/directory-structure/nuxt.config#runtimeconfig) option.
To expose config and environment variables to the rest of your app, you will need to define runtime configuration in your [`nuxt.config`](/docs/guide/directory-structure/nuxt-config) file, using the [`runtimeConfig`](/docs/api/nuxt-config#runtimeconfig) option.

```ts [nuxt.config.ts]
export default defineNuxtConfig({
Expand Down
6 changes: 3 additions & 3 deletions docs/2.guide/3.going-further/7.layers.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Nuxt layers are a powerful feature that you can use to share and reuse partial N

:read-more{to="/docs/getting-started/layers"}

A minimal Nuxt layer directory should contain a [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) file to indicate it is a layer.
A minimal Nuxt layer directory should contain a [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file to indicate it is a layer.

```ts [base/nuxt.config.ts]
export default defineNuxtConfig({})
Expand All @@ -20,7 +20,7 @@ Additionally, certain other files in the layer directory will be auto-scanned an
- [`pages/*`](/docs/guide/directory-structure/pages) - Extend the default pages
- [`server/*`](/docs/guide/directory-structure/server) - Extend the default server endpoints & middleware
- [`utils/*`](/docs/guide/directory-structure/utils) - Extend the default utils
- [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config)- Extend the default nuxt config
- [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config)- Extend the default nuxt config
- [`app.config.ts`](/docs/guide/directory-structure/app-config) - Extend the default app config

## Basic Example
Expand Down Expand Up @@ -64,7 +64,7 @@ Additionally, certain other files in the layer directory will be auto-scanned an
::

::callout
If you're interested in deepening your understanding about layers, consider examining [a fully fleshed out [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) file on the [Docus theme](https://github.com/nuxt-themes/docus/blob/main/nuxt.config.ts).
If you're interested in deepening your understanding about layers, consider examining [a fully fleshed out [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) file on the [Docus theme](https://github.com/nuxt-themes/docus/blob/main/nuxt.config.ts).
::

## Starter Template
Expand Down
2 changes: 1 addition & 1 deletion docs/3.api/4.commands/typecheck.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ links:
npx nuxi typecheck [--log-level] [rootDir]
```

The `typecheck` command runs [`vue-tsc`](https://github.com/vuejs/language-tools/tree/master/packages/vue-tsc) to check types throughout your app.
The `typecheck` command runs [`vue-tsc`](https://github.com/vuejs/language-tools/tree/master/packages/tsc) to check types throughout your app.

Option | Default | Description
-------------------------|-----------------|------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/6.bridge/1.overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ npm install -D @nuxt/bridge@npm:@nuxt/bridge-edge

Please make sure to avoid any CommonJS syntax such as `module.exports`, `require` or `require.resolve` in your config file. It will soon be deprecated and unsupported.

You can use static `import`, dynamic `import()` and `export default` instead. Using TypeScript by renaming to [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt.config) is also possible and recommended.
You can use static `import`, dynamic `import()` and `export default` instead. Using TypeScript by renaming to [`nuxt.config.ts`](/docs/guide/directory-structure/nuxt-config) is also possible and recommended.

```ts [nuxt.config.ts]
import { defineNuxtConfig } from '@nuxt/bridge'
Expand Down
2 changes: 1 addition & 1 deletion docs/7.migration/2.configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ It will be much easier to migrate your application if you use Nuxt's TypeScript
You can read more about Nuxt's TypeScript support [in the docs](/docs/guide/concepts/typescript).

::callout
Nuxt can type-check your app using [`vue-tsc`](https://github.com/vuejs/language-tools/tree/master/packages/vue-tsc) with `nuxi typecheck` command.
Nuxt can type-check your app using [`vue-tsc`](https://github.com/vuejs/language-tools/tree/master/packages/tsc) with `nuxi typecheck` command.
::

### Migration
Expand Down
4 changes: 2 additions & 2 deletions docs/7.migration/20.module-authors.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ export default () => { }

With Nuxt 3, Nuxt is now a build-time-only dependency, which means that modules shouldn't attempt to hook into the Nuxt runtime.

Your module should work even if it's only added to [`buildModules`](/docs/guide/directory-structure/nuxt.config#buildmodules) (instead of `modules`). For example:
Your module should work even if it's only added to [`buildModules`](/docs/api/nuxt-config#runtimeconfig) (instead of `modules`). For example:

- Avoid updating `process.env` within a Nuxt module and reading by a Nuxt plugin; use [`runtimeConfig`](/docs/guide/directory-structure/nuxt.config#publicruntimeconfig) instead.
- Avoid updating `process.env` within a Nuxt module and reading by a Nuxt plugin; use [`runtimeConfig`](/docs/api/nuxt-config#runtimeconfig) instead.
- (*) Avoid depending on runtime hooks like `vue-renderer:*` for production
- (*) Avoid adding `serverMiddleware` by importing them inside the module. Instead, add them by referencing a file path so that they are independent of the module's context

Expand Down