Build Vue3 with Vite to deploy into "subfolder" URL defined by Octopus variable substitution

536 Views Asked by At

I need to host my Vue3 app not in the root of the domain but in a subfolder e.g. https://my.domain.com/vue-app/. I have found this in a vite documentation: https://vitejs.dev/guide/build.html#public-base-path and tried to add base into my vite.config.js like:

    // vite.config.js
    export default defineConfig({
      base: "#{AppBaseUrl}",
      // ... the rest of config
    })

But it didn't helped. After the build index.html still contains links to /assets/... e.g.

<script type="module" crossorigin src="/assets/index-789e2ef4.js"></script>

next I tried to use command line parameter --base="#{AppBaseUrl}" with no luck.

The APP was created using npm init vue@latest and updated to latest versions of vite and vue3.

Am I missing something?

0

There are 0 best solutions below