@@ -80,21 +80,6 @@ exports.generateRedirects = async ({ netlifyConfig, basePath, i18n }) => {
80
80
netlifyConfig . redirects . push ( { from : `${ basePath } /:locale/_next/static/*` , to : `/static/:splat` , status : 200 } )
81
81
}
82
82
83
- const staticManifest = join ( netlifyConfig . build . publish , 'static-manifest.json' )
84
- if ( process . env . EXPERIMENTAL_MOVE_STATIC_PAGES && existsSync ( staticManifest ) ) {
85
- // Static page files need to have a forced redirect for preview mode. Otherwise it's non-forced
86
- const staticFiles = await readJSON ( staticManifest )
87
- netlifyConfig . redirects . push (
88
- ...staticFiles . map ( ( file ) => ( {
89
- from : `${ basePath } /${ file } ` ,
90
- to : HANDLER_FUNCTION_PATH ,
91
- status : 200 ,
92
- force : true ,
93
- conditions : { Cookie : [ '__prerender_bypass' , '__next_preview_data' ] } ,
94
- } ) ) ,
95
- )
96
- }
97
-
98
83
// This is only used in prod, so dev uses `next dev` directly
99
84
netlifyConfig . redirects . push (
100
85
{ from : `${ basePath } /_next/static/*` , to : `/static/:splat` , status : 200 } ,
@@ -103,6 +88,7 @@ exports.generateRedirects = async ({ netlifyConfig, basePath, i18n }) => {
103
88
to : HANDLER_FUNCTION_PATH ,
104
89
status : 200 ,
105
90
conditions : { Cookie : [ '__prerender_bypass' , '__next_preview_data' ] } ,
91
+ force : true ,
106
92
} ,
107
93
...redirects . map ( ( redirect ) => ( {
108
94
from : `${ basePath } ${ redirect } ` ,
0 commit comments