Skip to content

Commit

Permalink
Copy invalid-resolve-alias as it is being linked in the codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens committed Jul 8, 2019
1 parent 18abc98 commit bb2ae41
Showing 1 changed file with 22 additions and 1 deletion.
1 change: 0 additions & 1 deletion errors/invalid-resolve-alias.md

This file was deleted.

22 changes: 22 additions & 0 deletions errors/invalid-resolve-alias.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Invalid webpack resolve alias

#### Why This Error Occurred

When overriding `config.resolve.alias` incorrectly in `next.config.js` webpack will throw an error because private-next-pages is not defined.

#### Possible Ways to Fix It

This is not a bug in Next.js, it's related to the user adding a custom webpack(config) config to next.config.js and overriding internals by not applying Next.js' aliases. Solution would be:

```js
webpack(config) {
config.resolve.alias = {
...config.resolve.alias,
// your aliases
}
}
```

### Useful Links

- [Related issue](https://github.com/zeit/next.js/issues/6681)

0 comments on commit bb2ae41

Please sign in to comment.