1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Copy the static directory for static file serving.

This commit is contained in:
Arunoda Susiripala 2017-05-14 05:41:13 +05:30
parent 430789b99f
commit c40ded0c12

View file

@ -35,6 +35,15 @@ export default async function (dir, options) {
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)
// Get the exportPathMap from the `next.config.js`