Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not possible to have two steal bundled apps on the same page #1520

Open
4 tasks
ivospinheiro opened this issue Jul 6, 2020 · 2 comments
Open
4 tasks

Not possible to have two steal bundled apps on the same page #1520

ivospinheiro opened this issue Jul 6, 2020 · 2 comments

Comments

@ivospinheiro
Copy link

How often can you reproduce it?

  • [x ] Always
  • Sometimes
  • Rarely
  • Unable
  • I didn’t try

Description:

When we add two different applications with steal bundled and they are deployed on different pathname or different domains, the applications does not work as expected.
The second loaded applications tries to load for a stealConfig.js file and when the application loads static content it tries to load the content from the main HTML file baseURL.

Steps to reproduce:

  1. Checkout the code from steal-multi-app.git
  2. Follow the instructions on README.md file

Expected results:

The app should work without any failing resource request.

Actual results:
The second application tries to load stealConfig.js file.
Both applications fails to load when trying to load the static content assets like CSS files.

Environment:

Software Version
Steal version 2.2.4
Steal-tools version 2.2.6
node -v v12.13.0
npm -v 6.12.0
Browser Chrome
Operating system Linux
@matthewp
Copy link
Member

matthewp commented Jul 6, 2020

Steal is a very global library. Is it not possible to use a shared config and use the mult-app build ?

@ivospinheiro
Copy link
Author

@matthewp using a shared config and use a multi-app build the apps need to be build at the same time, right?
Something like:

stealTools.build({
  main: ["app1/src/index", "app2/src/index"]
});

In this case the apps source code are available on the same repo and below the same root folder, but what I'm trying to have is the apps be available from different domains/path names, developed by different teams and source code hosted on different repos, something similar to micro-frontends.

Something similar to what single-spa does, but in my case using web components, to join the different apps into a same html.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants