diff --git a/src/core/server/app/index.ts b/src/core/server/app/index.ts index 9c418db21..c6663b4e8 100644 --- a/src/core/server/app/index.ts +++ b/src/core/server/app/index.ts @@ -97,7 +97,7 @@ function setupViews(options: AppOptions) { const { parent } = options; // configure the default views directory. - const views = path.join(__dirname, "..", "..", "..", "static"); + const views = path.join(__dirname, "..", "..", "..", "..", "dist", "static"); parent.set("views", views); // Reconfigure nunjucks. diff --git a/src/core/server/app/middleware/serveStatic.ts b/src/core/server/app/middleware/serveStatic.ts index ed21e62a2..418dede24 100644 --- a/src/core/server/app/middleware/serveStatic.ts +++ b/src/core/server/app/middleware/serveStatic.ts @@ -2,7 +2,7 @@ import serveStatic from "express-static-gzip"; import path from "path"; const staticPath = path.resolve( - path.join(__dirname, "..", "..", "..", "..", "static", "assets") + path.join(__dirname, "..", "..", "..", "..", "..", "dist", "static", "assets") ); export default serveStatic(staticPath, { index: false });