ADVERTISEMENT
Friday, January 22, 2021
  • PRESS RELEASE
  • ADVERTISE
  • CONTACT
No Result
View All Result
Tech News, Magazine & Review WordPress Theme 2017
  • Home
  • Technology

    An EU parliament website for COVID testing allegedly broke the EU’s privacy laws

    Biden reportedly hiring cybersecurity experts in wake of SolarWinds hack

    Janet Yellen Will Consider Limiting the Use of Cryptocurrency

    Stuck Design’s New Touchless Elevator Buttons Are Exactly What the World Needs – Review Geek

    Apple TV+ review: ‘Losing Alice’ a suspenseful, sexy thriller from Israel

    These virtual robot arms get smarter by training each other

  • Science

    ‘Sextuply-eclipsing sextuple star system’ discovered whirling through the Milky Way

    New Crocodile-Like Fossil Traces Prove Dinosaurs Were Not Wiped-Out

    Restoring Environmental Rules Rolled Back by Trump Could Take Years

    High-profile Chinese scientist cleared of fraud and plagiarism charges involving more than 60 papers | Science

    Read a free issue of How It Works magazine!

    AI can grade your skill at piano by watching you play

  • Medical/Pharmacology

    Trump’s pardons included healthcare execs behind massive frauds

    FDA approves first long-acting injectable regimen for HIV

    Travel bans should be based on evidence, not politics or fear

    More Than 200,000 Americans Have Lupus

    Better post-surgery care would dramatically improve cancer survival

    KHN’s ‘What the Health?’: The Biden health agenda

    Trending Tags

    • Playstation 4 Pro
    • iOS 10
    • iPhone 7
    • Sillicon Valley
  • Cloud Computing

    Feature Friday Episode 31 – Cloud Director Availability 4.1 Service Monitoring

    New Armored Vehicles Automatic Fire Extinguishing Systems (AFES) Market Research 2021-2025 | Market Impact Analysis

    Key customer benefits of the expanded SAP and Microsoft partnership | Azure Blog and Updates

    Amazon Lex Introduces an Enhanced Console Experience and New V2 APIs

    Inside VMware Cloud Foundation components in 4.0

    AWS, Google Cloud, Equinix among Europe climate neutral data centre pact founders

  • Data Center

    Preempting Regulation, EU Operators Strike Green Data Center Pact

    Asian cloud providers maintain strong reputation in the region

    TeleGeography releases data center benchmark tool

    Basics of AWS’ and Rivals’ Hybrid Cloud Solutions in Colocation

    Experts predict hot enterprise architecture trends for 2021

    Google Cloud launches suite of e-commerce search solutions for retailers

  • Software Development

    How much does a web design cost?

    Filtering data with react-query library: advantages and examples

    Demystify Graph Coloring Algorithms | by Edward Huang | Better Programming | Jan, 2021

    SD Times news digest: Progress releases new Kendo UI Native components, Platform9 announces new DevOps productivity capabilities, and Visual Studio 2019 v 16.9 preview 3

    Apple’s VR headset to launch as niche ‘precursor’ to mainstream AR glasses

    Singly Linked list – Tutorial And Example

  • The Quotes Of The Day
  • Home
  • Technology

    An EU parliament website for COVID testing allegedly broke the EU’s privacy laws

    Biden reportedly hiring cybersecurity experts in wake of SolarWinds hack

    Janet Yellen Will Consider Limiting the Use of Cryptocurrency

    Stuck Design’s New Touchless Elevator Buttons Are Exactly What the World Needs – Review Geek

    Apple TV+ review: ‘Losing Alice’ a suspenseful, sexy thriller from Israel

    These virtual robot arms get smarter by training each other

  • Science

    ‘Sextuply-eclipsing sextuple star system’ discovered whirling through the Milky Way

    New Crocodile-Like Fossil Traces Prove Dinosaurs Were Not Wiped-Out

    Restoring Environmental Rules Rolled Back by Trump Could Take Years

    High-profile Chinese scientist cleared of fraud and plagiarism charges involving more than 60 papers | Science

    Read a free issue of How It Works magazine!

    AI can grade your skill at piano by watching you play

  • Medical/Pharmacology

    Trump’s pardons included healthcare execs behind massive frauds

    FDA approves first long-acting injectable regimen for HIV

    Travel bans should be based on evidence, not politics or fear

    More Than 200,000 Americans Have Lupus

    Better post-surgery care would dramatically improve cancer survival

    KHN’s ‘What the Health?’: The Biden health agenda

    Trending Tags

    • Playstation 4 Pro
    • iOS 10
    • iPhone 7
    • Sillicon Valley
  • Cloud Computing

    Feature Friday Episode 31 – Cloud Director Availability 4.1 Service Monitoring

    New Armored Vehicles Automatic Fire Extinguishing Systems (AFES) Market Research 2021-2025 | Market Impact Analysis

    Key customer benefits of the expanded SAP and Microsoft partnership | Azure Blog and Updates

    Amazon Lex Introduces an Enhanced Console Experience and New V2 APIs

    Inside VMware Cloud Foundation components in 4.0

    AWS, Google Cloud, Equinix among Europe climate neutral data centre pact founders

  • Data Center

    Preempting Regulation, EU Operators Strike Green Data Center Pact

    Asian cloud providers maintain strong reputation in the region

    TeleGeography releases data center benchmark tool

    Basics of AWS’ and Rivals’ Hybrid Cloud Solutions in Colocation

    Experts predict hot enterprise architecture trends for 2021

    Google Cloud launches suite of e-commerce search solutions for retailers

  • Software Development

    How much does a web design cost?

    Filtering data with react-query library: advantages and examples

    Demystify Graph Coloring Algorithms | by Edward Huang | Better Programming | Jan, 2021

    SD Times news digest: Progress releases new Kendo UI Native components, Platform9 announces new DevOps productivity capabilities, and Visual Studio 2019 v 16.9 preview 3

    Apple’s VR headset to launch as niche ‘precursor’ to mainstream AR glasses

    Singly Linked list – Tutorial And Example

  • The Quotes Of The Day
Infinity CS News
No Result
View All Result

Micro Frontends Using Single-SPA and Module Federation | by Manato Kuroda | Better Programming | Jan, 2021

Superuser by Superuser
January 12, 2021
Home Software Development
Share on FacebookShare on Twitter


Now we’re prepared to start out exporting the navigation app.

Subsequent, we register it within the residence app. To register the micro-frontends app, the next steps are required:

  • Embody script tag
  • Listing in remotes
  • Add a registration
  • Embody a container div

Let’s undergo these steps.

Embody script tag

First, to devour the code from the navigation app, we now have to incorporate it within the HTML file.

Go to residence/public/index.html and embody the script tag.

<!DOCTYPE html>
<html lang="en">
<head>
<script src="http://localhost:3001/remoteEntry.js"></script>
...
</head>

As said earlier than, The publicPath of the navigation app is http://localhost:3001 and the file identify is remoteEntry.js.

Listing in remotes

Subsequent, go to residence/webpack.config.js and specify the remotes part:

remotes: {
home-nav: 'navigation',
},

navigation is the identify of the configuration in navigation/webpack.config.js:

plugins: [
new ModuleFederationPlugin({
name: 'navigation',
library: { type: 'var', name: 'navigation' },
filename: 'remoteEntry.js',
remotes: {},
exposes: {
Header: './src/Header',
Footer: './src/Footer',
},
shared: ['react', 'react-dom', 'single-spa-react'],
}),
],

The home-nav is the identify used within the residence app.

You’ll be able to change the identify of the import by altering the important thing to no matter you need.

Add a registration

Subsequent, we register the navigation app in residence/src/index.ts:

The registerApplication takes three issues:

  • An software identify
  • A operate to load the appliance’s code
  • A operate that determines when the appliance is energetic or inactive

The import operate specifies the identify of the remotes key as said above.

() => import('home-nav/Header'),

Embody a container div

Lastly, we write a div container that’s used to incorporate a Header and Footer element.

Go to residence/public/index.html and add them:

By default, with no possibility, single-spa will go discover single-spa-application:{app identify} and render the HTML under.

On this case, we’ve already registered the Header and Footer as header and footer so it can discover the id of single-spa-application:header and single-spa-application:footer.

Let’s do this out.

Earlier than that, make sure that to put in dependencies:

yarn

And begin the server on the root:

yarn begin

So, navigate to http://localhost:3000 and you can see that two React elements rendered efficiently.



Source link

Tags: FederationFrontendsJanKurodaManatoMicromoduleProgrammingSingleSPA
Superuser

Superuser

Next Post

Hustle Quotes To Turn You into Ambitious Personality

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Infinity CS News

Get the latest news and follow the coverage of Tech updates, science, breakthrough research news and more from the top trusted sources.

Categories

  • Cloud Computing
  • Data Center
  • Medical / Pharmacology
  • Science
  • Software Development
  • Technology
  • The Quotes Of The Day

Recent Posts

  • Trump’s pardons included healthcare execs behind massive frauds
  • ‘Sextuply-eclipsing sextuple star system’ discovered whirling through the Milky Way
  • New Crocodile-Like Fossil Traces Prove Dinosaurs Were Not Wiped-Out
  • Home
  • Disclaimer
  • DMCA
  • Privacy Policy
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact

Copyright © 2021 Infiniti CS News

No Result
View All Result
  • Home
  • Technology
  • Science
  • Medical/Pharmacology
  • Cloud Computing
  • Data Center
  • Software Development
  • The Quotes Of The Day

Copyright © 2021 Infiniti CS News