Commit 026d52fb authored by JJ Kasper's avatar JJ Kasper Committed by Joe Haddad

Update to not copy static and public folders during auto export (#8923)

parent a73fb5d0
......@@ -139,7 +139,7 @@ export default async function (dir, options, configuration) {
await mkdirp(join(outDir, '_next', buildId))
// Copy static directory
if (existsSync(join(dir, 'static'))) {
if (!options.buildExport && existsSync(join(dir, 'static'))) {
log(' copying "static" directory')
await recursiveCopy(join(dir, 'static'), join(outDir, 'static'))
}
......@@ -226,6 +226,7 @@ export default async function (dir, options, configuration) {
const publicDir = join(dir, CLIENT_PUBLIC_FILES_PATH)
// Copy public directory
if (
!options.buildExport &&
nextConfig.experimental &&
nextConfig.experimental.publicDirectory &&
existsSync(publicDir)
......
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