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:
parent
955cc82736
commit
d015bac65f
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue