Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

96
Views
Sharing a single instance of angular library among all the angular element project

I am using https://github.com/akhil110/microfrontend_workspace approach to creating web components using angular elements, I created 3 web components and one angular shared-data library inside the projects folder, but when I build a project, the library also gets included inside each web component (in main.js), so that I am not able to share data because of multiple instances of the library, I believe that I need to exclude library inside the bundle. I am trying to set some data, and common methods from my container application so that it can be utilized by all web components. This is my webpack.external.js

const webpack = require('webpack');
module.exports = {
 "externals": {
     "rxjs": "rxjs",
     "@angular/core": "ng.core",
     "@angular/common": "ng.common",
     "@angular/common/http": "ng.common.http",
     "@angular/platform-browser": "ng.platformBrowser",
     "@angular/platform-browser-dynamic": "ng.platformBrowserDynamic",
     "@angular/compiler": "ng.compiler",
     "@angular/elements": "ng.elements",
     "projects/common-lib/src":"common-lib",
 },

}

Can someone share the solution to this problem... Thanks

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!