Commit ee8b050
Switch ReactDOM to ESM import to match ESM exports
We are experiencing a breaking change when using [email protected] (2.6.1 worked fine) when built into a Vite project. ReactDOM is not defined when attempting to import it in `renderHelpers.js`. Through changing the code in node_modules for react_ujs, we have found that changing ReactDOM to an ESM import resolves the issue. This is because build tools often (I recall having this issue in the past with Webpack) have trouble mixing requires (non-ESM) with ESM exports. This PR resolves this issue by changing to an import.1 parent ca2c2af commit ee8b050
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
0 commit comments