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

Copy static assets from .next folder when exporting (#3719)

* Copy .next/static directory when exporting

* Use nextDir
This commit is contained in:
Scott Polhemus 2018-02-07 05:54:07 -05:00 committed by Arunoda Susiripala
parent 955cc82736
commit d015bac65f

View file

@ -49,6 +49,15 @@ export default async function (dir, options, configuration) {
)
}
// Copy .next/static directory
if (existsSync(join(nextDir, 'static'))) {
log(' copying "static build" directory')
await cp(
join(nextDir, 'static'),
join(outDir, '_next', 'static')
)
}
// Copy dynamic import chunks
if (existsSync(join(nextDir, 'chunks'))) {
log(' copying dynamic import chunks')