make changes for serving on subpath

This commit is contained in:
hay-kot 2021-05-04 09:22:39 -08:00
commit 21a335eec8
3 changed files with 5 additions and 5 deletions

View file

@ -6,8 +6,7 @@
:80 { :80 {
@proxied path /api/* /docs /openapi.json @proxied path /api/* /docs /openapi.json
root * /app/dist encode gzip zstd
encode gzip
uri strip_suffix / uri strip_suffix /
# Handles Recipe Images / Assets # Handles Recipe Images / Assets
@ -21,8 +20,8 @@
} }
handle { handle {
try_files {path}.html {path} / root * /app/dist
try_files {path}.html {path} /index.html
file_server file_server
} }
} }

View file

@ -22,6 +22,7 @@ export const routes = [
]; ];
const router = new VueRouter({ const router = new VueRouter({
base: process.env.BASE_URL,
routes, routes,
mode: process.env.NODE_ENV === "production" ? "history" : "hash", mode: process.env.NODE_ENV === "production" ? "history" : "hash",
scrollBehavior() { scrollBehavior() {

View file

@ -1,7 +1,7 @@
const path = require("path"); const path = require("path");
module.exports = { module.exports = {
transpileDependencies: ["vuetify"], transpileDependencies: ["vuetify"],
publicPath: process.env.NODE_ENV === "production" ? "/" : "/", publicPath: process.env.NODE_ENV === "production" ? "/" : "",
outputDir: process.env.NODE_ENV === "production" ? "./dist" : "../mealie/web", outputDir: process.env.NODE_ENV === "production" ? "./dist" : "../mealie/web",
devServer: { devServer: {
proxy: { proxy: {