4a7ab34baf
This updates our `yarn next` command to leverage react v18 by default and removes the need for the test require hook/config modifying when testing react 18. There are some fixtures we need to investigate react 18 support in follow-ups: - `test/integration/client-navigation-a11y` - `test/integration/critical-css` - `test/integration/custom-error-page-exception` - `test/integration/font-optimization` - AMP specific tests
14 lines
450 B
JavaScript
14 lines
450 B
JavaScript
module.exports = function withReact17(config) {
|
|
config.webpack = (webpackConfig) => {
|
|
const { alias } = webpackConfig.resolve
|
|
// Use react 18
|
|
alias['react'] = 'react-17'
|
|
alias['react-dom'] = 'react-dom-17'
|
|
alias['react-dom/client'] = 'react-dom-17/client'
|
|
alias['react-dom/server'] = 'react-dom-17/server'
|
|
alias['react-dom/server.browser'] = 'react-dom-17/server.browser'
|
|
|
|
return webpackConfig
|
|
}
|
|
return config
|
|
}
|