mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 01:53:55 +00:00
docs: replace every nuxt.config.js sample with nuxt.config.js|ts (#861)
This commit is contained in:
parent
950d08559a
commit
9b917f8c70
@ -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({
|
||||||
|
@ -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'
|
||||||
|
@ -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
|
||||||
|
@ -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 {
|
||||||
|
@ -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
|
||||||
---
|
---
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user