From aac1aeb2d70cf4e6cda26ec64e1c0c3d6e9eeef7 Mon Sep 17 00:00:00 2001
From: Winnie Hellmann <winnie@gitlab.com>
Date: Fri, 26 Apr 2019 16:34:12 +0000
Subject: [PATCH] Make router base generic

---
 nuxt.config.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/nuxt.config.js b/nuxt.config.js
index c19f7b0..752b31c 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -1,5 +1,8 @@
 import pkg from './package'
 
+const { CI_PAGES_URL } = process.env
+const base = CI_PAGES_URL && new URL(CI_PAGES_URL).pathname
+
 export default {
   mode: 'universal',
 
@@ -34,7 +37,7 @@ export default {
   ** Customize the base url
   */
   router: {
-    base: '/nuxt/'
+    base
   },
 
   /*
-- 
GitLab