fix: Production file paths
This commit is contained in:
parent
1fa3db4bdc
commit
5aa092853b
|
@ -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)));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Reference in New Issue