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: remove auto-imported defineNitroConfig #1441

Merged
merged 2 commits into from
Jul 17, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs/content/1.guide/1.configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ If you are using [Nuxt](https://nuxt.com), use the `nitro` option in your Nuxt c

::code-group
```ts [nitro.config.ts]
import { defineNitroConfig } from 'nitropack/config'

export default defineNitroConfig({
// Nitro options
})
Expand Down
2 changes: 0 additions & 2 deletions docs/content/1.guide/3.routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ When `cache` option is set, handlers matching pattern will be automatically wrap

::code-group
```ts [nitro.config.ts]
import { defineNitroConfig } from 'nitropack/config'

export default defineNitroConfig({
routeRules: {
'/blog/**': { swr: true },
Expand Down
2 changes: 0 additions & 2 deletions docs/content/1.guide/4.storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ You can mount storage drivers using the `storage` option:

::code-group
```ts [nitro.config.ts]
import { defineNitroConfig } from 'nitropack/config'

export default defineNitroConfig({
storage: {
'redis': {
Expand Down
6 changes: 0 additions & 6 deletions docs/content/1.guide/5.cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ To overwrite the production storage, set the `cache` mountpoint using the `stora

::code-group
```ts [nitro.config.ts]
import { defineNitroConfig } from "nitropack/config";

export default defineNitroConfig({
storage: {
cache: {
Expand Down Expand Up @@ -123,8 +121,6 @@ Cache all the blog routes for 1 hour with `stale-while-revalidate` behavior:

::code-group
```ts [nitro.config.ts]
import { defineNitroConfig } from "nitropack/config";

export default defineNitroConfig({
routeRules: {
"/blog/**": {
Expand Down Expand Up @@ -156,8 +152,6 @@ If we want to use a custom storage mountpoint, we can use the `base` option. Let

::code-group
```ts [nitro.config.ts]
import { defineNitroConfig } from "nitropack/config";

export default defineNitroConfig({
storage: {
redis: {
Expand Down
4 changes: 0 additions & 4 deletions docs/content/1.guide/6.assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ In order to add assets from a custom directory, path will need to be defined in

::code-group
```js [nitro.config.ts]
import { defineNitroConfig } from 'nitropack/config'

export default defineNitroConfig({
serverAssets: [{
baseName: 'my_directory',
Expand Down Expand Up @@ -101,8 +99,6 @@ export default defineEventHandler(async () => {

::code-group
```js [nitro.config.ts]
import { defineNitroConfig } from 'nitropack/config'

export default defineNitroConfig({
serverAssets: [{
baseName: 'templates',
Expand Down
3 changes: 0 additions & 3 deletions docs/content/1.guide/7.plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ If you have plugins in another directory, you can use the `plugins` option:

::code-group
```ts [nitro.config.ts]
import { defineNitroConfig } from 'nitropack/config'

export default defineNitroConfig({
plugins: ['my-plugins/hello.ts']
})
Expand Down Expand Up @@ -81,4 +79,3 @@ export default defineNitroPlugin((nitro) => {
})
})
```

2 changes: 0 additions & 2 deletions docs/content/2.deploy/0.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ NITRO_PRESET=aws-lambda nitro build
**Example:** Using [nitro.config.ts](/guide/configuration)

```ts
import { defineNitroConfig } from "nitropack/config";

export default defineNitroConfig({
preset: 'node-server'
})
Expand Down
2 changes: 0 additions & 2 deletions docs/content/2.deploy/3.custom-presets.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ Then in your nitro config file, you can use your custom preset.

::code-group
```ts [nitro.config.ts]
import { defineNitroConfig } from "nitropack/config";

export default defineNitroConfig({
preset: "./preset",
});
Expand Down
2 changes: 0 additions & 2 deletions docs/content/2.deploy/providers/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ Nitro output, by default uses dynamic chunks for lazy loading code only when nee

::code-group
```ts [nitro.config.ts]
import { defineNitroConfig } from "nitropack/config";

export default defineNitroConfig({
inlineDynamicImports: true
});
Expand Down
2 changes: 0 additions & 2 deletions docs/content/2.deploy/providers/vercel.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ Update your configuration:

::code-group
```ts [nitro.config.ts]
import { defineNitroConfig } from 'nitropack/config'

export default defineNitroConfig({
storage: {
data: { driver: 'vercelKV' }
Expand Down
5 changes: 0 additions & 5 deletions docs/content/3.config.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ In order to customize Nitro's behavior, we create a file named `nitro.config.ts`

::code-group
```ts [nitro.config.ts]
import { defineNitroConfig } from "nitropack/config";

export default defineNitroConfig({
// options
});
Expand Down Expand Up @@ -252,7 +250,6 @@ We can use `devHandlers` but note that they are **only available in development
For example:

```ts
import { defineNitroConfig } from 'nitropack/config'
import { defineEventHandler } from 'h3'

export default defineNitroConfig({
Expand Down Expand Up @@ -295,8 +292,6 @@ Path to a custom runtime error handler. Replacing nitro's built-in error page.
**Example:**

```js [nitro.config]
import { defineNitroConfig } from "nitropack/config";

export default defineNitroConfig({
errorHandler: "~/error",
});
Expand Down