Commit c40ded0c authored by Arunoda Susiripala's avatar Arunoda Susiripala

Copy the static directory for static file serving.

parent 430789b9
...@@ -35,6 +35,15 @@ export default async function (dir, options) { ...@@ -35,6 +35,15 @@ export default async function (dir, options) {
join(outDir, '_next', buildStats['app.js'].hash, 'app.js') join(outDir, '_next', buildStats['app.js'].hash, 'app.js')
) )
// Copy static directory
if (existsSync(join(dir, 'static'))) {
log(' copying "static" directory')
await cp(
join(dir, 'static'),
join(outDir, 'static')
)
}
await copyPages(nextDir, outDir, buildId) await copyPages(nextDir, outDir, buildId)
// Get the exportPathMap from the `next.config.js` // Get the exportPathMap from the `next.config.js`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment