I have a bundled single page application (SPA), that is build with Vue.js, and is working as is when served from a server. Now I want to create a confluence add-on that redirects to my SPA upon certain interaction.
What is the general setup for this? I found that jirban-jira is doing something similar, though it is an angular application and the setup is still unclear to me.
I've got it to the point, where my servlet renders a vm template that itself redirects to the download resources where I've placed the SPA and its index.html file. So the redirect part seems to be working. In fact, it is currently set up as the index.vm of the jirban-jira project.
Now the main problem seems to be that serving the SPA as a static download resource of the plugin does not work. Although the index.html is opened, all the relative paths within the SPA are not resolved correctly.
I assume that I need to serve the SPA differently, i.e. not as a download resource of my plugin. How do I do this and what is the URL under which it will be accessible then? Is there any public example of how to achieve this?
Or do I need to go down a totally different road, e.g. by using an i-frame somehow?
Nevermind, I got it working now. The problem was that the bundled index.html used references without './' prefix, e.g.
src=/static/.... instead of src=./static/....
replacing them seems to do the trick.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.