Comments (7)
The Angular CLI does not compile the App as UMD module. And therefore system.js in the portal app can't load it.
You need a custom webpack.config.js which defines all the necessary steps to compile the Angular app with singleSpaEntry.js as entry file to a UMD module.
Take a look in the folder "app5Angular" which is an Angular 6 app that works.
from single-spa-portal-example.
So, if we have a team working with a project generate with angular-cli, we need to eject the build to do with webpack? it's posible to mantain both configurations (angular-cli and webpack.config) in the same project?
from single-spa-portal-example.
Also, I am getting the same issue...
Uncaught Error: Application 'app6' died in status LOADING_SOURCE_CODE: Unable to dynamically transpile ES module A loader plugin needs to be configured via
SystemJS.config({ transpiler: 'transpiler-module' }). Instantiating http://localhost:9000/app6/singleSpaEntry.js Loading /app6/singleSpaEntry.js
Is there any way to load angular 6 cli app with singleSpaEntry.js?
appreciate your help...
from single-spa-portal-example.
Did you find a way around this? I am also having this issue.
from single-spa-portal-example.
@fireappsAdmin @kgamalseif
This question has already an answer, you need to eject your apps (if possible) and then create a custom webpack.config
-> Take a look in the folder "app5Angular" which is an Angular 6 app that works. Or have a look below.
@adrianlemess
I created an Angular 6 app (which doesn't have the ng eject
option anymore and used "@angular-builders/custom-webpack": "^2.5.4",
then in my angular.json
you have to update the build options like this:
"build": { "builder": "@angular-devkit/build-angular:browser",
You'll find more info at the package website. Anyways if you place just the webpack.config.js in your root folder and add the npm run watch:portal
from the example Angular apps it'll work and serve the app to the portal.
from single-spa-portal-example.
@maciej-w
Thanks for reply, I also used the app5Angular as a guide, and unfortunately got the same error.
I am able to browse my app after npm run watch:portal
as below, but got the LOADING_SOURCE_CODE error when browsing using portal.
Appreciate your help...
from single-spa-portal-example.
@kgamalseif - I can see that this is a different app than form the example. To me it looks like your module is not building correctly, without looking at the code I'm not able to help. Please follow this to check if your code follows best practices: Angular AOT
from single-spa-portal-example.
Related Issues (20)
- Possible to work with a laravel-vue app ?
- Authentication/Authorization HOT 1
- ng-zorro component unmount HOT 1
- appname died in status loading_source_code:"does not export an unmount function or array of function"
- Cannot read property 'bootstrap' of undefined
- is it possible to add react app with create-react-app? HOT 3
- Proxy configuration for production environment. HOT 1
- SystemJS 3.0.0 issue HOT 2
- How to implement react hot loader
- portal webpack external useless
- Error at final step 3 while running portal watch command "npm run watch" HOT 1
- How to use Vue cli3.0 as a portal?
- Difficulty in starting the App HOT 1
- App5Angular: navigation to subroutes from browser not triggering ngOnInit
- How to do production build
- Deprecation warning HOT 4
- how can i use alias in vue?
- Trying to Load Modules From Same Local
- Is it possible to add Blazor-App into the portal?
- The service doesn't start
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 single-spa-portal-example.