fix: Production file paths

This commit is contained in:
Tom Moor 2020-08-23 20:35:59 -07:00
parent 1fa3db4bdc
commit 5aa092853b
2 changed files with 3 additions and 6 deletions

View File

@ -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)));
});
}

View File

@ -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);