root-config | Start here if you 're learning microfrontends | Single Page Application library
kandi X-RAY | root-config Summary
kandi X-RAY | root-config Summary
This is an example microfrontend repo demonstrating how to use single-spa. You can see the code running at
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of root-config
root-config Key Features
root-config Examples and Code Snippets
@Override
protected Class[] getRootConfigClasses() {
return new Class[]{};
}
@Override
protected Class[] getRootConfigClasses() {
return null;
}
protected Class[] getRootConfigClasses() {
return new Class[] { WebMvcConfig.class, WebFlowConfig.class };
}
Community Discussions
Trending Discussions on root-config
QUESTION
I have a single spa application with a root-config, a styleguide, and a couple of react applications. All of these application are generated using the yarn create single-spa
command.
I tried creating a kit
from the font-awesome website and adding it to the root-config index.ejs inside the head
tag.
Then I tried adding in one of my MFEs.
The loaded index.html in my browser include the tag code. But it's dimensions are 0x0.
ANSWER
Answered 2022-Mar-15 at 19:08You are missing some styles.
When you generate your kit
, the font awesome website shares a snippet of the script
tag for your kit.
You need to place it in the head
section of your root-config
.
But that's not all. You also need to add some font-faces
.
The same page (with the snippet) also has a link to download example html file.
If you check that file it has extra style
tags.
Once you add those to your root-config
, the icons will start showing up.
This issue is not single-spa, it's the confusing documentation for font-awesome.
QUESTION
I have some code that I use a (old) Mersenne Twister header file with to get a good pseudo-random number generator.
The problem is that that code uses the register
keyword which (as far as I understand) was deprecated in c++11
and throws an error with c++17
. I believe I am using the latter in the version of clang
I'm using on Mac OSX (10.14.6; Mojave).
The Makefile I am using is as thus:
...ANSWER
Answered 2021-Oct-20 at 03:15@MadScientist and @idz were correct above. The key was that the root libraries when using root-config --cflags --glibs
added the following:
QUESTION
I have 3 TypeScript projects below:
- root-config
- parcel, let us call it
my-app
- in-browser utility module, let us call it
api
All the projects above were generated using the create-single-spa
command.
In the api/src/lomse-api.ts
file, I'm exporting the fetchPeople
module as shown below:
ANSWER
Answered 2021-Feb-28 at 00:03That error is a TypeScript error, not a JavaScript or single-spa error. Here are options for what you need to do:
- Publish your utility module to a registry (types are optional since TS can infer from the source, though types are better). Then install it into each other microfrontend's node_modules. Since it's a webpack external, the version in node_modules will only be used for typescript compilation but not for execution in the browser.
- You could publish only the types, whether as an individual package or together with other microfrontend's typings.
- Mock the utility module's types, as described here.
Source:
QUESTION
I've been experimenting with single-spa for a while, and understand the basics of the developer experience. Create a parcel, yarn start on a unique port, add the reference to the import map declaration, and so on. The challenge with this is that as my root-config accrues more and more modules managing ports and import-maps starts to get tedious. What I want is to publish these modules to a central repository and load them from there (e.g., http://someserver.com/repository/moduleA/myorg-modulea.js, etc.).
I was recently introduced to localstack and started thinking maybe a local S3 bucket would serve for this. I have a configuration where builds (yarn build) are automatically published to an s3 bucket running on localstack. But when I try to load the root config index.html from the bucket I get the following JS error:
...ANSWER
Answered 2020-Dec-10 at 19:21I had a similar issue that I got to work with http-server
by adding each child .js file to a sub-folder in the root-config directory and launching the web server at the root-config directory level.
QUESTION
I've created a few apps that follow the same pattern as the react-microfrontend projects listed on the Single-spa examples page. However, these examples are not using TypeScript.
I am receiving a TS error when App2 tries to import a function that exists in App1, because App2 is unable to find the typings for the App1 object. And this makes sense to me, since the importmap.json
that is referenced in the index.html
file of the root-config project only has a URL listed for the .js file of each microfrontend. I really don't want to add @ts-ignore statements everywhere, and I also don't want to do cross-app communication without being type safe.
An example of what I'm referring to:
This file in the Planets app references the Button component from the Styleguide app. I am unable to build this unless I place a @ts-ignore on the line before the import statement, because my Planets app cannot find the type declarations for Styleguide.
I am very new to import maps and SystemJS in general, so if anyone could point me in the right direction, I'd appreciate it. I've actually gone through the trouble of building my Styleguide as a regular npm library and just including it as a dependency in the Planets package.json file... which kind of defeats the whole purpose of using Single-spa in the first place.
importmap.json
...ANSWER
Answered 2020-Oct-30 at 17:45Unfortunately no, they cannot be shared via the import map because that operates in the browser, and browsers do not understand TypeScript syntax.
Your alternatives are:
- Publish your module's types to an npm registry and
npm install
it into each dependent microfrontend- One caveat here: you will need to update this with every new publish of the shared module, but that can be automated with various tools such as renovate
- Mock the utility module's types
More info can be found at this Github issue: https://github.com/single-spa/single-spa/issues/609#issuecomment-665132965
QUESTION
I am getting a Clang compiler error when compiling ROOT script:
~/root_install/include/ROOT/RStringView.hxx:32:4: error: redefinition of 'basic_string_view' as different kind of symbol using basic_string_view = ::std::experimental::basic_string_view<_CharT,_Traits>;
/usr/include/c++/9/string_view:90:11: note: previous definition is here
class basic_string_view
This is the problematic code in ROOT library:
...ANSWER
Answered 2020-Sep-15 at 09:34ROOT can be compiled with clang++
(but not with clang
) using the following command:
clang++ file.C `root-config --cflags --libs`
This also works with the -std=c++20
flag.
QUESTION
Apparently, CERN's "Root" software is compatible (as of version 6.12) with C++17. However, I have been completely unable to get this to work with the newest version (6.20) and all previous questions I found on this topic are from a few years ago.
Does anyone with Root experience know if there is a particular compiler option to get it to work with C++17?
Examples of errors I get when trying to compile a trivial "Hello world" program:
- The following is (I think) due to the "TFile.h" header implicitly loading "TString.h":
ANSWER
Answered 2020-Jul-01 at 08:12You can use root only with the c++ standard with which your root version has been compiled. This is a known inconvenience and I believe the developers would be happy if/when they get this sorted out. The build configuration root-config --cflags
should set the appropriate c++ standard. This might very well be c++17 (it is for me)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install root-config
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page