Skip to content

Commit

Permalink
Update to not copy static and public folders during auto export
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Oct 1, 2019
1 parent b5da739 commit 198eb17
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/next/export/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
}
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 198eb17

Please sign in to comment.