Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Commit 7e19f03

Browse files
fix: s3 upload file paths fix
1 parent ca4ce9b commit 7e19f03

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

__tests__/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ describe("ServerlessNextJsPlugin", () => {
186186

187187
return plugin.uploadStaticAssets().then(() => {
188188
expect(uploadStaticAssetsToS3).toBeCalledWith({
189-
staticAssetsPath: path.join(distDir, "static"),
189+
staticAssetsPath: path.join("/path/to/next", distDir, "static"),
190190
bucketName: "my-bucket",
191191
providerRequest: expect.any(Function)
192192
});

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ class ServerlessNextJsPlugin {
8282
}
8383

8484
return uploadStaticAssetsToS3({
85-
staticAssetsPath: path.join(nextConfiguration.distDir, "static"),
85+
staticAssetsPath: path.join(
86+
this.nextConfigDir,
87+
nextConfiguration.distDir,
88+
"static"
89+
),
8690
providerRequest: this.providerRequest,
8791
bucketName: staticAssetsBucket
8892
});

0 commit comments

Comments
 (0)