Skip to content

Commit

Permalink
Upgrade to react 19 (#428)
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldenning authored Dec 17, 2024
1 parent aa75689 commit 317a5c5
Show file tree
Hide file tree
Showing 6 changed files with 612 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/beige-waves-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"webpack-config-single-spa-react": major
---

Add react-dom/client to externals
5 changes: 5 additions & 0 deletions .changeset/forty-bats-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"generator-single-spa": major
---

Upgrade to single-spa-react@6 and react@19
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"webpack-merge": "^5.8.0"
},
"dependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2",
"single-spa-react": "^4.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0",
"single-spa-react": "^6.0.2"
}
}
2 changes: 2 additions & 0 deletions packages/generator-single-spa/src/react/templates/src/main.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import React from "react";
import ReactDOM from "react-dom";
import ReactDOMClient from "react-dom/client";
import singleSpaReact from "single-spa-react";
import Root from "./root.component";

const lifecycles = singleSpaReact({
React,
ReactDOM,
ReactDOMClient,
rootComponent: Root,
errorBoundary(err, info, props) {
// Customize the root error boundary for your microfrontend here.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function webpackConfigSingleSpaReact(opts) {
const config = webpackConfigSingleSpa(opts);

if (!webpackConfigEnv.standalone) {
config.externals.push("react", "react-dom");
config.externals.push("react", "react-dom", "react-dom/client");
}

return config;
Expand Down
Loading

0 comments on commit 317a5c5

Please sign in to comment.