VUE_APP_BASE_URL to CI_PAGES_URL
Loading
-
References
- https://about.gitlab.com/blog/2023/09/13/hosting-vuejs-apps-using-gitlab-pages/
- https://gitlab.com/demos/applications/vuejs-gitlab-pages
origianl
vue.config.js
const { defineConfig } = require('@vue/cli-service') function publicPath () { if (process.env.CI_PAGES_URL) { return new URL(process.env.CI_PAGES_URL).pathname } else { return '/' } } module.exports = defineConfig({ transpileDependencies: true, publicPath: publicPath(), outputDir: 'public' })
Please register or sign in to comment