Skip to content

Commit

Permalink
Update paths in other places
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens committed Jun 30, 2021
1 parent 0f8f9a2 commit 76c08a2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/api-reference/next.config.js/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = (phase, { defaultConfig }) => {
}
```

`phase` is the current context in which the configuration is loaded. You can see the [available phases](https://github.com/vercel/next.js/blob/canary/packages/next/next-server/lib/constants.ts#L1-L4). Phases can be imported from `next/constants`:
`phase` is the current context in which the configuration is loaded. You can see the [available phases](https://github.com/vercel/next.js/blob/canary/packages/next/shared/lib/constants.ts#L1-L4). Phases can be imported from `next/constants`:

```js
const { PHASE_DEVELOPMENT_SERVER } = require('next/constants')
Expand All @@ -44,7 +44,7 @@ module.exports = (phase, { defaultConfig }) => {
}
```

The commented lines are the place where you can put the configs allowed by `next.config.js`, which are [defined in this file](https://github.com/vercel/next.js/blob/canary/packages/next/next-server/server/config-shared.ts#L68).
The commented lines are the place where you can put the configs allowed by `next.config.js`, which are [defined in this file](https://github.com/vercel/next.js/blob/canary/packages/next/server/config-shared.ts#L68).

However, none of the configs are required, and it's not necessary to understand what each config does. Instead, search for the features you need to enable or modify in this section and they will show you what to do.

Expand Down
2 changes: 1 addition & 1 deletion docs/basic-features/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ The `next.config.js` file must be a JavaScript file as it does not get parsed by
// @ts-check

/**
* @type {import('next/dist/next-server/server/config').NextConfig}
* @type {import('next').NextConfig}
**/
const nextConfig = {
/* config options here */
Expand Down
2 changes: 1 addition & 1 deletion packages/next-plugin-storybook/preset.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { PHASE_PRODUCTION_BUILD } = require('next/constants')
const { findPagesDir } = require('next/dist/lib/find-pages-dir')
const loadConfig = require('next/dist/next-server/server/config').default
const loadConfig = require('next/dist/server/config').default
const getWebpackConfig = require('next/dist/build/webpack-config').default

const CWD = process.cwd()
Expand Down
5 changes: 5 additions & 0 deletions packages/next/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ import {
// @ts-ignore This path is generated at build time and conflicts otherwise
import next from '../dist/server/next'

// @ts-ignore This path is generated at build time and conflicts otherwise
import { NextConfig as NextConfigType } from '../dist/server/config'

export type NextConfig = NextConfigType

// Extend the React types with missing properties
declare module 'react' {
// <html amp=""> support
Expand Down

0 comments on commit 76c08a2

Please sign in to comment.