vue-microfrontends / root-config

Start here if you're learning microfrontends
MIT License
251 stars 63 forks source link

How to deploy in iis as application both root and child app #2

Closed pank789 closed 4 years ago

pank789 commented 4 years ago

Hi joel,

I was trying the to deploy applications under iis below is my config.

Root app - localhost/root Navbar - localhost/navbar App1 - localhost/app1 App2 - localhost/app2

But when i try to navigate from navbar using vue router view, the path becomes localhost/root/app1 which doesnt work.

In my both child app i have kept baserul as / and history mode on.

Can you guide me towards some documentation which would help me. I tried looking into example app but i could see in navbar, the navigation menu are directly placed app.vue file which are associate with direct path.

joeldenning commented 4 years ago

Hi @pank789. What do your <router-link>'s look like? Here's an example of what they should be like: https://github.com/vue-microfrontends/navbar/blob/327720d2b06fe8138930951fd97a2fb7d88fdc8b/src/App.vue#L25. Note that the to attribute should start with /. If you're omitting the leading slash, that could explain the problem.

Otherwise, I'm not sure what it could be. Checking the base url was a good thing to do - make sure it is correct in both the router/index.js file and the index.html file

pank789 commented 4 years ago

hi @joeldenning,

Thank You for guidance.

I was able to manage the deployment in IIS along with my colleague.

Can i update the process in the single-spa vue page about the deployment in IIS?

Also can you point me any live application which is using vue in single-spa users list. I was trying to understand if the systemjs is must for loading the component and will be seen in developer tools in live apps as well. But when i tried few of them i didnt see them so wanted to ensure that the approach that is mentioned to use in the single-spa for vue can be used for production and large site development.

joeldenning commented 4 years ago

I was able to manage the deployment in IIS along with my colleague.

Glad to hear it!

Can i update the process in the single-spa vue page about the deployment in IIS?

Yes, documentation about IIS would be great, although I don't think the single-spa-vue documentation is the right place. Instead, perhaps https://github.com/single-spa/import-map-deployer/tree/master/examples/ci-for-javascript-repo is better? Especially if you are using the import-map-deployer.

Also can you point me any live application which is using vue in single-spa users list. I was trying to understand if the systemjs is must for loading the component and will be seen in developer tools in live apps as well. But when i tried few of them i didnt see them so wanted to ensure that the approach that is mentioned to use in the single-spa for vue can be used for production and large site development.

@EvanBurbidge successfully launched single-spa + vue at a large organization in Europe. I'll ask him to comment here and give you a chance to talk if you'd like. On the single-spa slack workspace, his handle is @evanb54

I'm closing this issue since it appears to be resolved - however, feel free to comment further or reopen.

EvanBurbidge commented 4 years ago

Hi @pank789 if you're using router links or the Link component in react you need to make sure you've got a /my-apps-url in the to field. The router-view etc for VueJS will only work for child routes or routes defined in that specific micro frontend. When it compiles both router-link and Link compile to an or similar enough can't remember exactly off the top of my head but means you can route between applications quite easily :)

pank789 commented 4 years ago

@EvanBurbidge can you let me the vuejs site which you developed uses same setup ( systemjs based) and can share the web url for reference. My query is if the same setup can be use for large production project..?