Multi part application
-
Hi, for my project I need to create 3 SPAs but their configuration is almost the same. Is it possible to create them in the same CLI project?
├── src/
│ ├── spa1/
│ │ ├── assets/
│ │ ├── statics/
│ │ ├── components/
│ │ ├── …
│ │ ├── App.vue
│ │ └── index.template.html
│ ├── spa2/
│ │ ├── assets/
│ │ ├── statics/
│ │ ├── components/
│ │ ├── …
│ │ ├── App.vue
│ │ └── index.template.html
│ ├── spa3/
│ │ ├── assets/
│ │ ├── statics/
│ │ ├── components/
│ │ ├── …
│ │ ├── App.vue
│ │ └── index.template.html -
If you do it like this and have a security problem all 3 of your applications will be affected at the same time.
So maybe not the best idea regarding security, what do you think @mammadataei ?
-
There was a time, when I tried to have something similar. I used custom quasar configs, reverse proxies, etc and it was quite OK, but as for now, I settled with git submodules:
https://git-scm.com/book/en/v2/Git-Tools-Submodules
There is an excellent support for submodules in Visual Studio Code. It just works. I had to change my mind about project modularization but it also was OK in the long run.
-
@wolfiton Thanks for your answer, but these 3 SPAs are just part of one application and the same code base. We just want to separate front-end to different parts for maintainability. I think using three separate projects makes lots of code redundancy.
-
@mammadataei said in Multi part application:
@wolfiton I think using three separate projects makes lots of code redundancy.
There is ONE project (quasar) but THREE git subrepositories (git submodules). Additionally, because of git, you can use branches which gives additional flexibility. I understand, that only quasar conf plus filesystem dir structure, will not help.
-
Does your app use Vuex?
If it does then you can create components and even slots and reduce a lot of code repetition and customize on the fly.
More info here https://vuejs.org/v2/guide/components-slots.html
-
@qyloxe Thanks for your answer, I get the idea and it will be useful.