diff --git a/Caddyfile b/Caddyfile index fbbe2eb18..73fb21ab3 100644 --- a/Caddyfile +++ b/Caddyfile @@ -6,8 +6,7 @@ :80 { @proxied path /api/* /docs /openapi.json - root * /app/dist - encode gzip + encode gzip zstd uri strip_suffix / # Handles Recipe Images / Assets @@ -21,8 +20,8 @@ } handle { - try_files {path}.html {path} / + root * /app/dist + try_files {path}.html {path} /index.html file_server } - } \ No newline at end of file diff --git a/frontend/src/routes/index.js b/frontend/src/routes/index.js index 3caf21d72..3c4035dba 100644 --- a/frontend/src/routes/index.js +++ b/frontend/src/routes/index.js @@ -22,6 +22,7 @@ export const routes = [ ]; const router = new VueRouter({ + base: process.env.BASE_URL, routes, mode: process.env.NODE_ENV === "production" ? "history" : "hash", scrollBehavior() { diff --git a/frontend/vue.config.js b/frontend/vue.config.js index 1507b9431..97002b6ef 100644 --- a/frontend/vue.config.js +++ b/frontend/vue.config.js @@ -1,7 +1,7 @@ const path = require("path"); module.exports = { transpileDependencies: ["vuetify"], - publicPath: process.env.NODE_ENV === "production" ? "/" : "/", + publicPath: process.env.NODE_ENV === "production" ? "/" : "", outputDir: process.env.NODE_ENV === "production" ? "./dist" : "../mealie/web", devServer: { proxy: {