You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need some help with migrating existing Angular 4 application to single-spa please. 🙏 The docs explicitly mention that Angular 4 is supported, but I absolutely can't find any examples with Angular 4 so I would appreciate any help in the matter.
According to the documentation Angular v4 requires some manual installation steps:
I've installed single-spa-angular@3
I've created all the files, including the ones in subdirectories from this github (as .js or .ts and removed <% where applicable to the best of my ability. Although there are some places with template conditionals and it is not obvious what should be left and what should be deleted )
I've added new scripts to package.json as described in this code
Now the issue lies in the docs section about build process "Use Angular Builder"
My Angular 4 application uses angular-cli ""@angular/cli": "^1.7.4" . The docs instruct me to change angular.json file and set builder property there. However, Angular 4 application does not have angular.json file but uses angular-cli.json file instead. angular-cli.json file does not have anything at all about build process or architect property.
-------------- I'm stuck here -------------
because I don't understand how to build angular 4 application as a html-less and serve it as .js bundle such that I can register it in react root app, created with create-spa-app cli tool
Since there is nothing about build config in angular-cli.json and it is all hidden in ng, I considered to do ng eject. That proved to be way more involved. ng eject outputs dev version of webpack.config.js. And for prod there is ng eject --prod. Both of these configs are huge (600 lines) and surely do not succeed currently.
The goal here is to modify the configuration so that it mimics what the single-spa-angular build/serve builders do for newer CLI versions. But I certainly have no idea of how to achieve it.
This issue with documentation and missing setup steps is probably also affecting Angular 5 because there is no angular.json file there either. The first angular with angular.json is Angular 6
If our efforts are successful here, the documentation should probably be updated as well
@arstrel I began maintaining this project in 2020 when it was already using Angular version 9. This means I was unaware of how the project would be compatible with earlier Angular versions, as its maintenance had been discontinued many years ago. I'll attempt to regain access to my Slack account in the single-spa workspace so that we can chat there. It might still be challenging to understand what's happening on your side until I can review the actual code.
Please also note that old single-spa-angular versions are unreliable and have a lot of issues that were fixed in next versions.
Question
I need some help with migrating existing Angular 4 application to single-spa please. 🙏 The docs explicitly mention that Angular 4 is supported, but I absolutely can't find any examples with Angular 4 so I would appreciate any help in the matter.
According to the documentation Angular v4 requires some manual installation steps:
single-spa-angular@3
.js
or.ts
and removed<%
where applicable to the best of my ability. Although there are some places with template conditionals and it is not obvious what should be left and what should be deleted )Now the issue lies in the docs section about build process "Use Angular Builder"
My Angular 4 application uses
angular-cli ""@angular/cli": "^1.7.4"
. The docs instruct me to changeangular.json
file and set builder property there. However, Angular 4 application does not haveangular.json
file but usesangular-cli.json
file instead.angular-cli.json
file does not have anything at all about build process or architect property.-------------- I'm stuck here -------------
because I don't understand how to build angular 4 application as a
html-less
and serve it as.js
bundle such that I can register it inreact root
app, created withcreate-spa-app
cli toolSince there is nothing about build config in
angular-cli.json
and it is all hidden inng
, I considered to dong eject
. That proved to be way more involved.ng eject
outputs dev version ofwebpack.config.js
. And for prod there isng eject --prod
. Both of these configs are huge (600 lines) and surely do not succeed currently.The goal here is to modify the configuration so that it mimics what the
single-spa-angular
build/serve builders do for newer CLI versions. But I certainly have no idea of how to achieve it.Webpack dev config. Created by `ng eject`
Webpack config prod. Created by `ng eject --prod`
Impact
This issue with documentation and missing setup steps is probably also affecting Angular 5 because there is no
angular.json
file there either. The first angular withangular.json
is Angular 6If our efforts are successful here, the documentation should probably be updated as well
Environment
The text was updated successfully, but these errors were encountered: