@@ -22,7 +22,7 @@ interface NetlifyOpts {
22
22
}
23
23
24
24
function generateAbsolutePaths (
25
- options : Pick < NetlifyOpts , 'inputs' | 'netlifyConfig' >
25
+ options : Pick < NetlifyOpts , 'inputs' >
26
26
) : {
27
27
absolute : {
28
28
/** The absolute path to the build folder for Next.js. */
@@ -39,7 +39,7 @@ function generateAbsolutePaths(
39
39
const buildDirPathFromProject = options . inputs . build_dir_path ?? '.' ;
40
40
41
41
/** The absolute path to the build folder for Next.js. */
42
- const absoluteBuildDirPath = joinPaths ( options . netlifyConfig . build . base , buildDirPathFromProject , buildDirName , 'cache' ) ;
42
+ const absoluteBuildDirPath = joinPaths ( buildDirPathFromProject , buildDirName , 'cache' ) ;
43
43
/** The absolute path to the build manifest Next.js uses. */
44
44
// I don't actually know if this build manifest has any relation to the cache folder
45
45
const manifestPath = joinPaths ( absoluteBuildDirPath , '..' , 'build-manifest.json' ) ;
@@ -59,8 +59,8 @@ module.exports = {
59
59
// Does not do anything if:
60
60
// - the file/directory already exists locally
61
61
// - the file/directory has not been cached yet
62
- async onPreBuild ( { utils, netlifyConfig , inputs} : NetlifyOpts ) {
63
- const paths = generateAbsolutePaths ( { netlifyConfig , inputs} ) ;
62
+ async onPreBuild ( { utils, inputs} : NetlifyOpts ) {
63
+ const paths = generateAbsolutePaths ( { inputs} ) ;
64
64
const success = await utils . cache . restore ( paths . absolute . buildDir ) ;
65
65
66
66
if ( success ) {
@@ -76,10 +76,10 @@ module.exports = {
76
76
// If this is a directory, this includes children's contents
77
77
// Note that this will cache after the build, even if it fails, which fcould be unwanted behavior
78
78
async onPostBuild ( { utils, netlifyConfig, inputs} : NetlifyOpts ) {
79
- const paths = generateAbsolutePaths ( { netlifyConfig , inputs} ) ;
79
+ const paths = generateAbsolutePaths ( { inputs} ) ;
80
80
81
81
const success = await utils . cache . save ( paths . absolute . buildDir , {
82
- digests : [ paths . absolute . manifest ]
82
+ digests : [ paths . absolute . manifest ]
83
83
} ) ;
84
84
85
85
if ( success ) {
0 commit comments