File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ module.exports = {
21
21
} ,
22
22
trailingSlash : true ,
23
23
// Configurable site features _to_ support:
24
- // basePath: '/docs',
24
+ basePath : '/docs' ,
25
25
// Rewrites allow you to map an incoming request path to a different destination path.
26
26
async rewrites ( ) {
27
27
return {
Original file line number Diff line number Diff line change @@ -73,10 +73,12 @@ export const moveStaticPages = async ({
73
73
netlifyConfig,
74
74
target,
75
75
i18n,
76
+ basePath,
76
77
} : {
77
78
netlifyConfig : NetlifyConfig
78
79
target : 'server' | 'serverless' | 'experimental-serverless-trace'
79
80
i18n : NextConfig [ 'i18n' ]
81
+ basePath ?: string
80
82
} ) : Promise < void > => {
81
83
console . log ( 'Moving static page files to serve from CDN...' )
82
84
const outputDir = join ( netlifyConfig . build . publish , target === 'server' ? 'server' : 'serverless' )
@@ -117,11 +119,12 @@ export const moveStaticPages = async ({
117
119
const isData = file . endsWith ( '.json' )
118
120
const source = join ( root , file )
119
121
const targetFile = isData ? join ( dataDir , file ) : file
122
+ const targetPath = basePath ? join ( basePath , targetFile ) : targetFile
120
123
121
124
files . push ( file )
122
- filesManifest [ file ] = targetFile
125
+ filesManifest [ file ] = targetPath
123
126
124
- const dest = join ( netlifyConfig . build . publish , targetFile )
127
+ const dest = join ( netlifyConfig . build . publish , targetPath )
125
128
126
129
try {
127
130
await move ( source , dest )
You can’t perform that action at this time.
0 commit comments