mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +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.
|
||||
|
||||
```ts [nuxt.config.ts]
|
||||
```ts [nuxt.config.js|ts]
|
||||
import { defineNuxtConfig } from '@nuxt/bridge'
|
||||
|
||||
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:
|
||||
|
||||
```ts [nuxt.config.js]
|
||||
```ts [nuxt.config.js|ts]
|
||||
import { defineNuxtConfig } from '@nuxt/bridge'
|
||||
|
||||
export default defineNuxtConfig({
|
||||
|
@ -16,7 +16,7 @@ How to deploy Nuxt to Azure Static Web Apps or Azure Functions.
|
||||
|
||||
### Setup
|
||||
|
||||
```js [nuxt.config.js]
|
||||
```ts [nuxt.config.js|ts]
|
||||
export default {
|
||||
nitro: {
|
||||
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`.
|
||||
|
||||
```ts [nuxt.config.js]
|
||||
```ts [nuxt.config.js|ts]
|
||||
export default {
|
||||
nitro: {
|
||||
// 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:
|
||||
|
||||
```ts [nuxt.config.js]
|
||||
```ts [nuxt.config.js|ts]
|
||||
export default {
|
||||
nitro: {
|
||||
// preset options
|
||||
@ -43,7 +43,7 @@ export default myPreset
|
||||
|
||||
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'
|
||||
|
||||
export default {
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
icon: IconFile
|
||||
title: nuxt.config.js
|
||||
title: nuxt.config.ts
|
||||
head.title: Nuxt configuration file
|
||||
---
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user