refactor: Remove babel/register for instant production server startup

This commit is contained in:
Tom Moor
2020-08-23 19:10:16 -07:00
parent 70838918c3
commit e8719340d1
13 changed files with 305 additions and 285 deletions

View File

@ -18,7 +18,7 @@ const readFile = util.promisify(fs.readFile);
const readIndexFile = async (ctx) => {
if (isProduction) {
return readFile(path.join(__dirname, "../dist/index.html"));
return readFile(path.join(__dirname, "../build/app/index.html"));
}
const middleware = ctx.devMiddleware;
@ -54,7 +54,7 @@ if (process.env.NODE_ENV === "production") {
await sendfile(
ctx,
path.join(__dirname, "../dist/", ctx.path.substring(8))
path.join(__dirname, "../build/app/", ctx.path.substring(8))
);
});
}