docs: replace every nuxt.config.js sample with nuxt.config.js|ts (#861)

This commit is contained in:
Jonas Pfannkuche 2021-10-13 10:58:28 +02:00 committed by GitHub
parent 950d08559a
commit 9b917f8c70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View File

@ -57,7 +57,7 @@ Please make sure to avoid any CommonJS syntax such as `module.exports`, `require
You can use static `import`, dynamic `import()` and `export default` instead. Using TypeScript by renaming to `nuxt.config.ts` is also possible and recommended. You can use static `import`, dynamic `import()` and `export default` instead. Using TypeScript by renaming to `nuxt.config.ts` is also possible and recommended.
```ts [nuxt.config.ts] ```ts [nuxt.config.js|ts]
import { defineNuxtConfig } from '@nuxt/bridge' import { defineNuxtConfig } from '@nuxt/bridge'
export default defineNuxtConfig({ export default defineNuxtConfig({
@ -114,7 +114,7 @@ Avoid the usage of `__dirname` and `__filename` as much as possible.
🐛 Is something wrong? Please let us know by creating an issue. Also, you can easily disable bridge in the meantime: 🐛 Is something wrong? Please let us know by creating an issue. Also, you can easily disable bridge in the meantime:
```ts [nuxt.config.js] ```ts [nuxt.config.js|ts]
import { defineNuxtConfig } from '@nuxt/bridge' import { defineNuxtConfig } from '@nuxt/bridge'
export default defineNuxtConfig({ export default defineNuxtConfig({

View File

@ -16,7 +16,7 @@ How to deploy Nuxt to Azure Static Web Apps or Azure Functions.
### Setup ### Setup
```js [nuxt.config.js] ```ts [nuxt.config.js|ts]
export default { export default {
nitro: { nitro: {
preset: 'azure_functions' preset: 'azure_functions'

View File

@ -16,7 +16,7 @@ How to deploy Nuxt to a Node.js hosting using PM2.
Make sure another preset isn't set in `nuxt.config`. Make sure another preset isn't set in `nuxt.config`.
```ts [nuxt.config.js] ```ts [nuxt.config.js|ts]
export default { export default {
nitro: { nitro: {
// this is the default preset so you can also just omit it entirely // this is the default preset so you can also just omit it entirely

View File

@ -19,7 +19,7 @@ You can create your own custom build preset. See [the provided presets](https://
You can define everything that a custom preset would configure directly in the Nitro options: You can define everything that a custom preset would configure directly in the Nitro options:
```ts [nuxt.config.js] ```ts [nuxt.config.js|ts]
export default { export default {
nitro: { nitro: {
// preset options // preset options
@ -43,7 +43,7 @@ export default myPreset
Then in your `nuxt.config` you can specify that Nitro should use your custom preset: Then in your `nuxt.config` you can specify that Nitro should use your custom preset:
```ts [nuxt.config.js] ```ts [nuxt.config.js|ts]
import { resolve } from 'path' import { resolve } from 'path'
export default { export default {

View File

@ -1,6 +1,6 @@
--- ---
icon: IconFile icon: IconFile
title: nuxt.config.js title: nuxt.config.ts
head.title: Nuxt configuration file head.title: Nuxt configuration file
--- ---