[Vuejs]-VueJS not reference NestJS ServeRoot Base path

0๐Ÿ‘

โœ…

My solution was to add the pass path to my VueRouter when in production. For example if you are trying to replicate this is how it would look:

import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

const router = new Router({
  mode: 'history',
  base: (process.env.NODE_ENV === 'production' ? '/admin' : undefined ),
  routes: [...]
});

export default router;

Leave a comment