-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable webpack5 for all apps (#25639)
* Enable webpack 5 by default for all apps Still provides a way to opt-out using `webpack5: false` in next.config.js. Also throws an error for `future.webpack5`. * Update tests * Update test to run on webpack 4 instead of webpack 5 * disable webpack5 for legacy tests * Fix stats-config for webpack4 * update tests * update size for webpack4 test * move basic suite first * update basic test * Add logs * remove outdated testFutureDependencies job Co-authored-by: JJ Kasper <jj@jjsweb.site>
- Loading branch information
1 parent
069f7e8
commit e1502bc
Showing
18 changed files
with
116 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# `future.webpack5` has been moved to `webpack5` | ||
|
||
#### Why This Error Occurred | ||
|
||
The `future.webpack5` option has been moved to `webpack5` in `next.config.js`. | ||
|
||
#### Possible Ways to Fix It | ||
|
||
If you had the value `true` you can removed the option as webpack 5 is now the default for all Next.js apps unless opted out. | ||
|
||
If you had he value `false` you can update `next.config.js`: | ||
|
||
Change `future.webpack5` to `webpack5`. | ||
|
||
Current `next.config.js`: | ||
|
||
```js | ||
// next.config.js | ||
module.exports = { | ||
future: { | ||
webpack5: false, | ||
}, | ||
} | ||
``` | ||
|
||
Updated `next.config.js`: | ||
|
||
```js | ||
// next.config.js | ||
module.exports = { | ||
webpack5: false, | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
test/integration/css-fixtures/custom-configuration-legacy/next.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,4 @@ module.exports = { | |
|
||
return config | ||
}, | ||
future: { | ||
webpack5: true, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
const withSass = require('@zeit/next-sass') | ||
module.exports = withSass() | ||
module.exports = withSass({ | ||
// @zeit/next-sass is not supported with webpack 5 | ||
webpack5: false, | ||
}) |
Oops, something went wrong.