From 5aa092853b4dc7e37effdfe508352f90eb6e3d99 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sun, 23 Aug 2020 20:35:59 -0700 Subject: [PATCH] fix: Production file paths --- server/routes.js | 7 ++----- server/utils/prefetchTags.js | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/server/routes.js b/server/routes.js index 0182d73b..d1c53af0 100644 --- a/server/routes.js +++ b/server/routes.js @@ -18,7 +18,7 @@ const readFile = util.promisify(fs.readFile); const readIndexFile = async (ctx) => { if (isProduction) { - return readFile(path.join(__dirname, "../build/app/index.html")); + return readFile(path.join(__dirname, "../app/index.html")); } const middleware = ctx.devMiddleware; @@ -52,10 +52,7 @@ if (process.env.NODE_ENV === "production") { "Cache-Control": `max-age=${356 * 24 * 60 * 60}`, }); - await sendfile( - ctx, - path.join(__dirname, "../build/app/", ctx.path.substring(8)) - ); + await sendfile(ctx, path.join(__dirname, "../app/", ctx.path.substring(8))); }); } diff --git a/server/utils/prefetchTags.js b/server/utils/prefetchTags.js index 5b5c4a7f..36fa0ddf 100644 --- a/server/utils/prefetchTags.js +++ b/server/utils/prefetchTags.js @@ -16,7 +16,7 @@ const prefetchTags = [ try { const manifest = fs.readFileSync( - path.join(__dirname, "../../build/app/manifest.json"), + path.join(__dirname, "../../app/manifest.json"), "utf8" ); const manifestData = JSON.parse(manifest);