Comments (1)
I hope you are able to find a good solution for those angular applications.
Regarding the issue you reported, see related single-spa/single-spa-angular#59 which talks about the assets
in angular.json.
The behavior you are seeing is known/expected behavior, as we brainstorm better solutions.
With single-spa, there is only one HTML file, instead of one per angular application. Which means that the scripts
and assets
in the angular.json don't have a perfect way to be injected into the HTML like they would if there were a separate HTML file for each.
Options for you:
- Add deepstream and echarts into the root html file (preferred). Use a CDN like cdnjs or jsdelivr, which have both of those libraries.
- Add
import 'echarts/dist/echarts.min.js'
(and similar for deepstream) into your main.single-spa.ts file. Which includes them into your javascript bundle instead of in the HTML file. - Use a partial webpack config and add
deepstream
andecharts
as webpack externals. Make the externals be loaded from the CDN and then import them withimport 'echarts'
andimport 'deepstream'
:
// in your partial webpack config
{
externals: {
"deepstream": "https://jsdelivr.com/...",
"echarts": "https://jsdelivr.com/..."
}
}
I'm closing this since I think I've explained how it is known/expected behavior. If you have better ideas for how the scripts/assets from angular.json would be loaded, feel free to reopen or propose a change to single-spa-angular.
from coexisting-angular-microfrontends.
Related Issues (20)
- Upgrade an example with Angular 13. HOT 1
- Use IDE Debugger HOT 1
- how can I integrate a new angular application in another angular in a specific location?
- Import an utility module into microfrontend Angular
- Pending depdendencies pull requests
- Overlapping Micro-Apps When Mounting App1 and App2 on Single-Spa Routes HOT 1
- single spa won't display two apps at the same time HOT 5
- How to Build "coexisting-angular-microfrontends"? HOT 7
- Styles overlapping and not able to unmount while switching from one app to another HOT 1
- Can we have Proxy HOT 5
- App.component not rendered HOT 2
- app1 does not load HOT 1
- Issue with $localize() after upgrading to angular 9 HOT 2
- Navbar died in status SKIP_BECAUSE_BROKEN HOT 4
- Nested (Child) Routes in Angular HOT 1
- After building , navigating to "app1" gives 404 HOT 3
- set live load to true not working
- seems not work... HOT 1
- Current status of support HOT 3
- live reload HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coexisting-angular-microfrontends.