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:
parent
430789b99f
commit
c40ded0c12
|
@ -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`
|
||||
|
|
Loading…
Reference in a new issue