Skip to content

Commit ca791c3

Browse files
committed
refactor
1 parent 71a1f91 commit ca791c3

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

packages/open-next/src/overrides/incrementalCache/fs-dev.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { IncrementalCache } from "types/overrides.js";
55
import { getOutputDir } from "utils/normalize-path";
66

77
const buildId = process.env.NEXT_BUILD_ID;
8-
const basePath = path.join(getOutputDir(), `../../cache/${buildId}`);
8+
const basePath = path.join(getOutputDir(), `cache/${buildId}`);
99

1010
const getCacheKey = (key: string) => {
1111
return path.join(basePath, `${key}.cache`);

packages/open-next/src/overrides/tagCache/fs-dev.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { getOutputDir } from "utils/normalize-path";
66

77
const tagFile = path.join(
88
getOutputDir(),
9-
"../../dynamodb-provider/dynamodb-cache.json",
9+
"dynamodb-provider/dynamodb-cache.json",
1010
);
1111
const tagContent = fs.readFileSync(tagFile, "utf-8");
1212

packages/open-next/src/overrides/wrappers/express-dev.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import { getOutputDir } from "utils/normalize-path";
88
const wrapper: WrapperHandler = async (handler, converter) => {
99
const app = express();
1010
// To serve static assets
11-
app.use(express.static(path.join(getOutputDir(), "../../assets")));
11+
app.use(express.static(path.join(getOutputDir(), "assets")));
1212

1313
const imageHandlerPath = path.join(
1414
getOutputDir(),
15-
"../../image-optimization-function/index.mjs",
15+
"image-optimization-function/index.mjs",
1616
);
1717

1818
const imageHandler = await import(imageHandlerPath).then((m) => m.handler);

packages/open-next/src/utils/normalize-path.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ export function getOutputDir() {
1111
.filter(Boolean)
1212
.map(() => "..")
1313
.join("/"),
14+
"../../",
1415
);
1516
}

0 commit comments

Comments
 (0)