Commit d015bac6 authored by Scott Polhemus's avatar Scott Polhemus Committed by Arunoda Susiripala

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

* Copy .next/static directory when exporting

* Use nextDir
parent 955cc827
...@@ -49,6 +49,15 @@ export default async function (dir, options, configuration) { ...@@ -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 // Copy dynamic import chunks
if (existsSync(join(nextDir, 'chunks'))) { if (existsSync(join(nextDir, 'chunks'))) {
log(' copying dynamic import chunks') log(' copying dynamic import chunks')
......
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