I have an old ASP.Net app and I want to run a Vue 3 app under it.
In production, it would be something like:
some-app is the ASP.Net app.
It could be anything for some-domain and some-app (ie users can install the app onto any domain/url)
When I compile Vue for production and navigate to the /vue folder, I see the index page, but Vue is looking for the Assets in the root at localhost.
But it looks like some of the CSS loaded(?)
That’s when not using anything for the “base” property in my vite.config.ts
If I use
base: '' and then navigate to the vue folder, I’m getting the app’s 404 page and console says it’s looking for an image in the root.
If I use
base: '/vue' and then navigate to the vue folder, I see the html, but no CSS or anything is loading.
Console shows this error about the app.****.js file:
I feel like I’ve tried all variations for “base” in my vite.config.ts but still can’t get it.
I just need everything created in the “dist” production folder to be relative to that folder and disregard any folder/path above that.
So that using this URL: http://www.some-domain.com/some-app/vue
The content of “dist” is the vue folder and Vue to see that as the root and not look in “some-app” or “some-domain”.
I saw an earlier post where “some-app” is known and constant, but in my case that is not an option…my Vue app will always be at least 2 levels in from the root domain.
Hope that makes sense. Please let me know if you need any additional information.
Thanks in advance!