Skip to content

Commit 828369f

Browse files
committed
Remove obsolete doc
1 parent de23424 commit 828369f

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

docs/guides/rails-webpacker-react-integration-options.md

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -56,36 +56,6 @@ document.addEventListener('DOMContentLoaded', () => {
5656

5757
---
5858

59-
## Suppress warning related to Can't resolve 'react-dom/client' in React < 18
60-
61-
You may see a warning like this when building a Webpack bundle using any version of React below 18:
62-
63-
```
64-
Module not found: Error: Can't resolve 'react-dom/client' in ....
65-
```
66-
67-
It can be safely [suppressed](https://webpack.js.org/configuration/other-options/#ignorewarnings) in your Webpack configuration. The following is an example of this suppression in `config/webpack/commonWebpackConfig.js`:
68-
69-
```js
70-
const { webpackConfig: baseClientWebpackConfig, merge } = require('shakapacker');
71-
72-
const commonOptions = {
73-
resolve: {
74-
extensions: ['.css', '.ts', '.tsx'],
75-
},
76-
};
77-
78-
const ignoreWarningsConfig = {
79-
ignoreWarnings: [/Module not found: Error: Can't resolve 'react-dom\/client'/],
80-
};
81-
82-
const commonWebpackConfig = () => merge({}, baseClientWebpackConfig, commonOptions, ignoreWarningsConfig);
83-
84-
module.exports = commonWebpackConfig;
85-
```
86-
87-
---
88-
8959
## HMR and React Hot Reloading
9060

9161
Before turning HMR on, consider upgrading to the latest stable gems and packages:

0 commit comments

Comments
 (0)