Buckets:
| title: '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 filename="next.config.js" | |
| webpack(config) { | |
| config.resolve.alias = { | |
| ...config.resolve.alias, | |
| // your aliases | |
| } | |
| } | |
| ``` | |
| ## Useful Links | |
| - [Related issue](https://github.com/vercel/next.js/issues/6681) | |
Xet Storage Details
- Size:
- 659 Bytes
- Xet hash:
- bcea0763434c8ab0d8b7a4a17a1ba47c8d297d52aac5787d702b0059d6db4e52
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.