Questions tagged [single-spa-react]

17 questions
2
votes
1 answer

How to define routing for react Micro front end application in Single Spa

I have created a react micro front end application in single spa using the command create-single-spa. Inside the singleSpaReact method, the root component is mentioned. const lifecycles = singleSpaReact({ React, ReactDOM, Router, …
I'm nidhin
  • 2,592
  • 6
  • 36
  • 62
1
vote
0 answers

How can I import types/interfaces from a SingleSpa utility module to a Typescript based Micro frontend react app

I'm setting up Micro Frontend architecture using SingleSpa. My apps(micro frontends) are setup using Typescript. As I'm in need of extracting out some common/shareable types/interfaces. So, each app can consume these type(s) using SingleSpa provided…
1
vote
0 answers

svgr/webpack Not Working With Webpack 5 and SingleSpa

I been struggling with this for a week, I been reading another Stackoverflow questions and the SVGR/WEBPACK documentation but I'm unable to solve this. I wanted to upgrade an old react single-spa application but it had a lot of conflicting…
1
vote
0 answers

Reacr Single SPA Micro frontend executes old scripts after a fresh deployment

We are migrating a standalone React.js application into micro frontend architecture using the library react-single-spa https://single-spa.js.org/docs/ecosystem-react/ We noticed a problem that after a new deployment to any micro-frontend app, the…
1
vote
0 answers

Can you tell me what I'm doing wrong, I want to add React 18 support to single-spa projects, but I get this error

Uncaught TypeError: application '@app/hello-world' died in status LOADING_SOURCE_CODE: _types_single_spa_react__WEBPACK_IMPORTED_MODULE_2___default(...) is not a function webpack.config.js const { merge } = require("webpack-merge"); const Dotenv =…
Zahar
  • 71
  • 1
  • 6
1
vote
0 answers

How to import a single-spa in-browser utility module into a TypeScript parcel projects

I have 3 TypeScript projects below: root-config parcel, let us call it my-app in-browser utility module, let us call it utils All the projects above were generated using the create-single-spa command. In the utils/src/mfe-utils.tsx file, I'm…
Geydson
  • 21
  • 1
  • 2
0
votes
0 answers

on loading the page i am getting innerHTML Error

Trying to access the localStorage when the page completely loads. Since it was showing null, I used settimeout to fetch the data after 500sec, later I tried to load the page and got the below error. Error while loading Cannot set properties of null…
0
votes
0 answers

single-spa with react bi-directional host

Is it even possible to have bi-directional single-spa project? Let's say the host takes in two applications, one navbar written in react, and one dashboard written in vue. Now, the host easily can render each application by url pathname. But what if…
0
votes
0 answers

single-page-application routing is not working after deploying to s3 bucket

Root application and other MFE's are deployed to s3 bucket. I am able to load the first page ("/") of the application, but if I navigate to other page it throws error not found. I have used microfrontend-layout to define the…
0
votes
1 answer

single-spa consume shared utility module in ember

I want to use single-spa with react and ember apps that will need to share data between them, I would like to use https://single-spa.js.org/docs/module-types/#utilities utility module for exposing observable data. In react project utility module is…
0
votes
0 answers

single-spa root application as a react application

I have created a root project using the command create-single-spa Now I actually have a wrapper project which works on module federation internal to my company, which accepts only react applications to be imported. So inside this wrapper project…
rrahul789
  • 23
  • 6
0
votes
0 answers

Routers single spa microfront

My problem is that I want to access this "child" path of the microfront documents, but I don't know how to do it I have created at this moment two applications the container and a microfront in React called documents, in the…
0
votes
0 answers

How to run build two react projects together

**I have two single-spa projects (root-config, app-hello) and I need to create a build so that the file name is the same in both root-config and app-hello. The problem is that when I run the proteins separately in the build I get different dates in…
Zahar
  • 71
  • 1
  • 6
0
votes
0 answers

Single-spa-react. This XML file does not appear to have any style information associated with it. The document tree is shown below

I get this error when I refresh the backed up version of the project, on the local version everything is fine. How can I get rid of this error and just refresh the page? This XML file does not appear to have any style information associated with it.…
0
votes
0 answers

Server Render (SSR) One application in Single SPA

I have below Layout (routes.html) in my Single SPA Application
1
2